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 alias support to field() in attrs plugin #16610

Merged
merged 1 commit into from Dec 7, 2023
Merged

Add alias support to field() in attrs plugin #16610

merged 1 commit into from Dec 7, 2023

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Dec 4, 2023

Closes #16586
CC @ikonst

Copy link
Contributor

github-actions bot commented Dec 4, 2023

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

name = unmangle(lhs.name)
return Attribute(
name, ctx.cls.info, attr_has_default, init, kw_only, converter_info, stmt, init_type
name, alias, ctx.cls.info, attr_has_default, init, kw_only, converter_info, stmt, init_type
Copy link
Contributor

Choose a reason for hiding this comment

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

One day we'll make it kw-only :)

@sobolevn sobolevn merged commit 88bf6f2 into master Dec 7, 2023
18 checks passed
@sobolevn sobolevn deleted the issue-16586 branch December 7, 2023 13:37
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 plugin ignores field alias
2 participants