Skip to content

mypy errors every other run #10644

Closed
Closed
@gitpushdashf

Description

@gitpushdashf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugmypy got something wrong

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions