-
Notifications
You must be signed in to change notification settings - Fork 794
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
Type hints: Add static type checker mypy #2950
Conversation
…is expected due to _PropertySetter
Thanks for this PR @binste! Eg Dict[str, Any] | None Instead of Optional[Dict[str, Any]] |
Unfortunately no. The pipe operator throws a SyntaxError prior to 3.10, see https://mypy.readthedocs.io/en/stable/runtime_troubles.html#using-x-y-syntax-for-unions. This can be circumvented by doing the "Future Annotations Import" |
That's unfortunate. It would improve readability of the type definitions. |
Adds mypy as a linter and fixes all current errors. This is a prerequisite for the subsequent tasks outlined in #2951.