Skip to content

mypy errors every other run #10644

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

Closed
gitpushdashf opened this issue Jun 14, 2021 · 3 comments
Closed

mypy errors every other run #10644

gitpushdashf opened this issue Jun 14, 2021 · 3 comments
Labels
bug mypy got something wrong

Comments

@gitpushdashf
Copy link

Started getting this when upgrading from 0.812 to 0.902.

This is using Poetry and namespace_packages set to True. Otherwise, a pretty minimal mypy.ini.

python % poetry run mypy --strict
~/Library/Caches/pypoetry/virtualenvs/hos-dev-C-FUiXg3-py3.8/lib/python3.8/site-packages/google/fhir/_primitive_time_utils.py:34: error: Library stubs not installed for "backports" (or incompatible with Python 3.8)
~/Library/Caches/pypoetry/virtualenvs/hos-dev-C-FUiXg3-py3.8/lib/python3.8/site-packages/google/fhir/_primitive_time_utils.py:34: note: Hint: "python3 -m pip install types-backports"
~/Library/Caches/pypoetry/virtualenvs/hos-dev-C-FUiXg3-py3.8/lib/python3.8/site-packages/google/fhir/_primitive_time_utils.py:34: note: (or run "mypy --install-types" to install all missing stub packages)
~/Library/Caches/pypoetry/virtualenvs/hos-dev-C-FUiXg3-py3.8/lib/python3.8/site-packages/google/fhir/_primitive_time_utils.py:34: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 88 source files)
python % poetry run mypy --strict
Success: no issues found in 88 source files
python % poetry run mypy --strict
~/Library/Caches/pypoetry/virtualenvs/hos-dev-C-FUiXg3-py3.8/lib/python3.8/site-packages/google/fhir/_primitive_time_utils.py:34: error: Library stubs not installed for "backports" (or incompatible with Python 3.8)
~/Library/Caches/pypoetry/virtualenvs/hos-dev-C-FUiXg3-py3.8/lib/python3.8/site-packages/google/fhir/_primitive_time_utils.py:34: note: Hint: "python3 -m pip install types-backports"
~/Library/Caches/pypoetry/virtualenvs/hos-dev-C-FUiXg3-py3.8/lib/python3.8/site-packages/google/fhir/_primitive_time_utils.py:34: note: (or run "mypy --install-types" to install all missing stub packages)
~/Library/Caches/pypoetry/virtualenvs/hos-dev-C-FUiXg3-py3.8/lib/python3.8/site-packages/google/fhir/_primitive_time_utils.py:34: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
Found 1 error in 1 file (checked 88 source files)
python % poetry run mypy --strict
Success: no issues found in 88 source files

You can see how every other run it picks up that error. Very weird, not sure what to make of it.

@gitpushdashf gitpushdashf added the bug mypy got something wrong label Jun 14, 2021
@hauntsaninja
Copy link
Collaborator

Probably the same as #9852

@gitpushdashf
Copy link
Author

Thank you, that is helpful.

@hauntsaninja
Copy link
Collaborator

Fixed by #10937

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong
Projects
None yet
Development

No branches or pull requests

2 participants