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

Enable mypy.plugins.proper_plugin #2333

Merged
merged 2 commits into from
Aug 10, 2024

Conversation

flaeppe
Copy link
Member

@flaeppe flaeppe commented Aug 9, 2024

Refs: https://mypy.readthedocs.io/en/stable/extending_mypy.html#useful-tools

This resulted in quite a lot of changes.. I think there are multiple places in our plugin functions where we should use ProperType as return type instead of MypyType(our alias for mypy.types.Type), which could perhaps remove a couple of get_proper_type.

Not at all sure how much impact this could have, if any.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@@ -20,7 +20,8 @@ force_union_syntax = true


plugins =
mypy_django_plugin.main
mypy_django_plugin.main,
mypy.plugins.proper_plugin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I 100% forgot about it 😆
But, using it in django-stubs was my motivation for adding it to the mypy. namespace!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haha, yeah I happened to come across the documentation and started checking it out

@sobolevn sobolevn merged commit d4d7be7 into typeddjango:master Aug 10, 2024
36 checks passed
@flaeppe flaeppe deleted the fix/proper-plugin branch August 10, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants