Skip to content

[Type] Fix alias type annotation on Attribute class#1590

Open
hiro-nikaitou wants to merge 1 commit into
python-attrs:mainfrom
hiro-nikaitou:fix/alias-type
Open

[Type] Fix alias type annotation on Attribute class#1590
hiro-nikaitou wants to merge 1 commit into
python-attrs:mainfrom
hiro-nikaitou:fix/alias-type

Conversation

@hiro-nikaitou

Copy link
Copy Markdown

Fixes type annotation of Attribute.alias from str | None to str, since alias is always resolved to a string before it is exposed to users.

Closes #1540.

The alias attribute on Attribute instances is always resolved to str
before being exposed to users (via the class builder), so the type
should be str, not str | None.

Closes python-attrs#1540
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.

alias type in Attribute class

1 participant