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

Fix strict optional handling in attrs plugin #17451

Merged
merged 1 commit into from
Jun 29, 2024

Conversation

ilevkivskyi
Copy link
Member

Fixes #13794

Fix is trivial (but unlike for dataclasses, the calls to type ops are scattered, so I simply put the whole hook inside a single with).

Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@ilevkivskyi
Copy link
Member Author

Python 3.8 failure on Windows, looks like a flake.

@ilevkivskyi ilevkivskyi merged commit 177c8ee into python:master Jun 29, 2024
17 of 18 checks passed
@ilevkivskyi ilevkivskyi deleted the fix-attrs-opt branch June 29, 2024 23:34
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.

attrs: Inheritance breaks mypy type checking with optional attributes if Generics are involved
1 participant