Skip to content

Extend typing to tests #3591

@stefan6419846

Description

@stefan6419846

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    is-maintenanceAnything that is just internal: Simplifying code, syntax changes, updating docs, speed improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions