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

DM-38339: Update mypy configuration and type annotations #211

Merged
merged 2 commits into from
Mar 16, 2023
Merged

Conversation

rra
Copy link
Member

@rra rra commented Mar 16, 2023

Use the current mypy configuration, and work around typing limitations in GitPython. Follow the PEP-585 recommendations for type imports, use lowercase types where possible, use the new union syntax where appropriate, and use Self where appropriate.

rra added 2 commits March 16, 2023 09:51
Update to the current mypy configuration and fix various issues
it uncovered. This unfortunately includes importing git module
attributes from submodules since the way that GitPython dynamically
creates its __all__ variable at the top level is incompatible with
mypy.
Follow the PEP-585 recommendations to stop importing most types from
the typing module. Start using Self types where appropriate. Stop
using Optional in places where SQR-074 recommends | None instead,
and use the | syntax instead of Union.
@rra rra enabled auto-merge March 16, 2023 19:01
@rra rra merged commit 8a7bb44 into main Mar 16, 2023
@rra rra deleted the tickets/DM-38339 branch March 16, 2023 19: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.

1 participant