mypy --strict testing was removed in PYTHON-3686:
- name: Run mypy strict run: | mypy --strict test/test_typing_strict.py
This currently fails with 2072 errors:
Run mypy --strict test/test_typing_strict.py mypy --strict test/test_typing_strict.py shell: /usr/bin/bash -e {0} env: pythonLocation: /opt/hostedtoolcache/Python/3.7.16/x64 LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.7.16/x64/lib bson/__init__.py:119: note: In module imported here, pymongo/collection.py:106: note: ... from here, test/test_typing_strict.py:20: note: ... from here: bson/min_key.py: note: In member "__repr__" of class "MinKey": bson/min_key.py:53: error: Function is missing a type annotation [no-untyped-def] def __repr__(self): ^ bson/__init__.py:118: note: In module imported here, pymongo/collection.py:106: note: ... from here, test/test_typing_strict.py:20: note: ... from here: bson/max_key.py: note: In member "__repr__" of class "MaxKey": bson/max_key.py:53: error: Function is missing a type annotation [no-untyped-def] def __repr__(self): ^ pymongo/cursor.py:37: note: In module imported here, pymongo/collection.py:47: note: ... from here, test/test_typing_strict.py:20: note: ... from here: bson/code.py: note: In member "__repr__" of class "Code": bson/code.py:89: error: Function is missing a type annotation [no-untyped-def] def __repr__(self): ^ .... Found 2072 errors in 69 files (checked 1 source file)
Steve noted that it's odd that mypy complains about errors in pymongo in this test when it should only be checking the one test/test_typing_strict.py test file itself. This was probably a change in mypy.
- depends on
-
PYTHON-3697 Add type hints for internal pymongo apis
- Released
-
PYTHON-3992 Use the new type defaults for Generics
- Backlog
-
PYTHON-3932 Support mypy --strict testing in bson package
- Closed
-
PYTHON-3980 Drop usage of Generic types in PyMongo 5.0
- Closed
- is related to
-
PYTHON-4014 Apply QA Suggestions from Scientific Python Library Development Guide
- Closed
- related to
-
PYTHON-3992 Use the new type defaults for Generics
- Backlog
-
PYTHON-3679 Upgrade to mypy 1.2
- Closed