We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
$ mypy --version mypy 1.7.1 (compiled: yes) $ venv/bin/pip list|grep attrs attrs 23.1.0 $ cat a.py
import attrs @attrs.define class A: _x: int = attrs.field(alias="_x") a = A(_x=1) a = A(x=1)
$ venv/bin/python a.py Traceback (most recent call last): File "/home/uken/src/mypy-attrs-alias.bug/a.py", line 10, in <module> a = A(x=1) ^^^^^^ TypeError: A.__init__() got an unexpected keyword argument 'x'
$ mypy --python-executable=venv/bin/python a.py a.py:9: error: Unexpected keyword argument "_x" for "A" [call-arg] Found 1 error in 1 file (checked 1 source file)
See: https://www.attrs.org/en/stable/init.html#private-attributes-and-aliases
The text was updated successfully, but these errors were encountered:
alias
field()
attrs
Add alias support to field() in attrs plugin (#16610)
88bf6f2
Closes #16586 CC @ikonst
Successfully merging a pull request may close this issue.
$ mypy --version mypy 1.7.1 (compiled: yes) $ venv/bin/pip list|grep attrs attrs 23.1.0 $ cat a.py
See: https://www.attrs.org/en/stable/init.html#private-attributes-and-aliases
The text was updated successfully, but these errors were encountered: