Explanation
Currently, we do not enforce type hints in tests. At the same time, the tests potentially uncover wrong or incomplete type hints in the main code, and thus the checks should be extended to the test code.
Example: tests.test_xobject_image_helpers.test_handle_flate__image_mode_1 runs against pypdf._xobj_image_helpers._handle_flate with color_space being an ArrayObject, which is not properly reflected in the type hints.
Code Example
mypy tests
Explanation
Currently, we do not enforce type hints in tests. At the same time, the tests potentially uncover wrong or incomplete type hints in the main code, and thus the checks should be extended to the test code.
Example:
tests.test_xobject_image_helpers.test_handle_flate__image_mode_1runs againstpypdf._xobj_image_helpers._handle_flatewithcolor_spacebeing anArrayObject, which is not properly reflected in the type hints.Code Example
mypy tests