Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using typeshed stubs instead of dependencies #9574

Open
xrmx opened this issue Apr 29, 2024 · 1 comment
Open

Using typeshed stubs instead of dependencies #9574

xrmx opened this issue Apr 29, 2024 · 1 comment
Labels
Needs decision 🔒 Needs a decision before implemention or rejection Needs design proposal 🔒 This is a huge feature, some discussion should happen before a PR is proposed Proposal 📨

Comments

@xrmx
Copy link

xrmx commented Apr 29, 2024

Question

Would it be possible (or even make sense) to use to use the stubs from typeshed instead of the real libraries in pylint checks?

import requests

requests.get("https:")

returns

foo.py:3:0: W3101: Missing timeout argument for method 'requests.get' can cause your program to hang indefinitely (missing-timeout)

with requests installed but nothing with just types-requests.

Documentation for future user

No idea, it would be nice to have an example in the tutorial using a third party library and explicitly saying you need to install it in order to provide more checks.

Additional context

No response

@xrmx xrmx added Documentation 📗 Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling Question labels Apr 29, 2024
@Pierre-Sassoulas Pierre-Sassoulas added Proposal 📨 Needs decision 🔒 Needs a decision before implemention or rejection Needs design proposal 🔒 This is a huge feature, some discussion should happen before a PR is proposed and removed Question Documentation 📗 Needs triage 📥 Just created, needs acknowledgment, triage, and proper labelling labels Apr 30, 2024
@Pierre-Sassoulas
Copy link
Member

Thank you for the suggestion. I added the need design proposal because I don't know if we should always use the stub if it exists or leave the choice to the user, or how to remove the lib files from the analysis if the stub exists. It feels non trivial :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs decision 🔒 Needs a decision before implemention or rejection Needs design proposal 🔒 This is a huge feature, some discussion should happen before a PR is proposed Proposal 📨
Projects
None yet
Development

No branches or pull requests

2 participants