-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 signature for attr.evolve #14526
Changes from all commits
cd832cc
64a9e58
c145514
3477d2d
056ac66
8b7f3ca
d976202
1bdd315
4c8138d
46026fe
2316b06
5148e5f
cf756d1
34c8c94
87a4c0b
0976f86
babf91f
5443d51
5271233
bfcb366
0b79cc1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1775,7 +1775,7 @@ def copy_modified( | |
self: CT, | ||
arg_types: Bogus[Sequence[Type]] = _dummy, | ||
arg_kinds: Bogus[list[ArgKind]] = _dummy, | ||
arg_names: Bogus[list[str | None]] = _dummy, | ||
arg_names: Bogus[Sequence[str | None]] = _dummy, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the reason for this change? I'd prefer to avoid touching the mypy core in this PR. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because of list's invariance — otherwise, this fails since it passes arg_names=["inst"] + attrs_init_type.arg_names[1:],
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Broke out into #14840 — can merge then update this branch. |
||
ret_type: Bogus[Type] = _dummy, | ||
fallback: Bogus[Instance] = _dummy, | ||
name: Bogus[str | None] = _dummy, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JelleZijlstra now that we got this merged 😅 what would be the right place to discuss whether this should be promoted to be formal plugin API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open an issue, I suppose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👉 #14845