Skip to content

Conversation

@hugovk
Copy link
Member

@hugovk hugovk commented Dec 18, 2023

Helps #2625.

Run mypy to check type hints:

tox -e mypy

Some good advice here:

So let's start off small with just the src directory, and exclude lots of files with warnings, currently 61, so it's running on 34 to begin with.

This adds some fairly lenient settings (happy to tweak them now and later), notably follow_imports = "silent".

When mypy encounters an import, it also checks the imported file, and its imports. They recommend using the default "normal", but lots of things import others which aren't ready yet, so let's change it when we can.

@hugovk hugovk added the Testing label Dec 18, 2023
@hugovk
Copy link
Member Author

hugovk commented Dec 19, 2023

Rebased after #7624, and removed 44 files from the exclude, it now checks 76 files!

Co-authored-by: Andrew Murray <[email protected]>
@radarhere radarhere merged commit e2c9e33 into python-pillow:main Dec 20, 2023
@hugovk hugovk deleted the add-mypy branch December 20, 2023 07:22
@radarhere radarhere mentioned this pull request Feb 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants