-
Notifications
You must be signed in to change notification settings - Fork 80
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
CI: mypy: Fix missing stubs for third-party libs #315
Conversation
I don't have a clue on what's happening. This is the recommended argument. It's also giving segfault on my computer. Directly installing types-requests is a option, but I want to avoid it so we don't need to maintain it for every single lib. Tracking here. |
Ok, wheels are broken. |
New problem: |
ec59131
to
3818bec
Compare
--install-types
argument to fix missing stubs@@ -31,6 +31,9 @@ jobs: | |||
pip install pyfakefs pytest-cov pytest-timeout pylint mypy isort black asyncmock | |||
find . -type f -name "setup.py" | xargs --max-lines=1 --replace=% python % install --user | |||
|
|||
# Install necessary typesheds for mypy tests | |||
pip install types-requests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels that such package should be in the setup.py and not here..
Otherwise we are going to loose track in where the packages come from and if we are still using it.
@Williangalvani what you think ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can introduce a extra_require
section on the setup.py.
extras_require={
'dev': [
'types_requests'
]
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm ok with the original solution.
Having it as a dev dependecy sounds nice, but then we need to install each service in this script
2cb7abf
to
5d30ad8
Compare
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
5d30ad8
to
7c88a35
Compare
Closed in favor of #316 |
Mypy doesn't install stubs for third-party libraries anymore by default, like explained on the following article:
https://mypy-lang.blogspot.com/2021/05/the-upcoming-switch-to-modular-typeshed.html
Fix #315