8000 Add support for `attrs.fields` by Tinche · Pull Request #15021 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Add support for attrs.fields #15021

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

Merged
merged 10 commits into from
May 20, 2023
Merged
Prev Previous commit
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 19, 2023
commit 0b7335a751ffd066182bae25a990046c622f5863
2 changes: 1 addition & 1 deletion test-data/unit/check-plugin-attrs.test
Original file line number Diff line number Diff line change
Expand Up @@ -1582,7 +1582,7 @@ def f(t: TA) -> None:
reveal_type(fields(t)[0]) # N: Revealed type is "attr.Attribute[builtins.int]"
reveal_type(fields(t).b) # N: Revealed type is "attr.Attribute[builtins.int]"
fields(t).x # E: "____main___A_AttrsAttributes__" has no attribute "x"


[builtins fixtures/plugin_attrs.pyi]

Expand Down
0