Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config and an optional dependency for type checking with mypy #275

Merged
merged 1 commit into from
May 8, 2024

Conversation

celeste-sinead
Copy link
Contributor

This doesn't actually do a whole lot for existing code, because it's configured not to check the bodies of functions that don't have typed declarations. Meaningful checking can be introduced progressively from here; I started by configuring the pitch tracker modules to require type defs. Individual functions can also be checked, by adding types to their declarations.

Unfortunately pyqtProperty isn't type-checkable and does produce errors, so there's a fair amount of error-suppression noise for it :(

I noticed this in #201

This doesn't actually do a whole lot for existing code, because it's configured
not to check the bodies of functions that don't have typed declarations.
Meaningful checking can be introduced progressively from here; I started by
configuring the pitch tracker modules to require type defs. Individual
functions can also be checked, by adding types to their declarations.

Unfortunately pyqtProperty isn't type-checkable and does produce errors, so
there's a fair amount of error-suppression noise for it :(
@tlecomte
Copy link
Owner

tlecomte commented May 8, 2024

Thank you @celeste-sinead, that's something that I wanted to try for a while (and actually started a bit locally, but never got to commit). That's a very good basis. Thanks!

@tlecomte tlecomte merged commit 62002b5 into tlecomte:master May 8, 2024
4 checks passed
@celeste-sinead celeste-sinead deleted the mypy branch May 8, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants