Skip to content

Fix/attrs init overload #19104

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

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0ecd910
Fix handling of overloaded __init__ methods in attrs plugin
uko3211 May 18, 2025
f6c8dfd
Fix: handle CallableType resolution for attrs __init__
uko3211 May 18, 2025
989c9f3
Fix: Add exception handling and resolve issues caused by AnyType
uko3211 May 19, 2025
c375805
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 19, 2025
58a1d3d
Fix: Add exception handling and resolve issues caused by AnyType and …
uko3211 May 19, 2025
22c8dfd
Fix: return Anytype
uko3211 May 19, 2025
166776b
Fix: return Anytype on _get_expanded_attr_types
uko3211 May 19, 2025
04766f7
Add unit tests to verify fix for #19003 involving overloaded __init__…
uko3211 May 21, 2025
3b725e9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 21, 2025
34e831b
Add unit tests to verify fix for #19003 involving overloaded __init__…
uko3211 May 21, 2025
9065f79
Added error test case for overloaded custom __init__
uko3211 May 21, 2025
bd929fb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 21, 2025
ad415cb
Added error test case for overloaded custom __init__
uko3211 May 21, 2025
93db908
add plugin_generated check
uko3211 May 23, 2025
c4716de
fix test case
uko3211 May 23, 2025
0d0e8d3
fix/check-plugin-attrs.test&attrs.py_2\
uko3211 May 23, 2025
83feade
add attrs.py function
uko3211 May 23, 2025
6382550
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 23, 2025
b82db50
change getattr -> .plugin_generated && fix nodes.py
uko3211 May 24, 2025
b6c0b1a
edit check-plugin-attrs.test checking error
uko3211 May 24, 2025
e1821c6
edit check-plugin-attrs.test error fix
uko3211 May 24, 2025
20c8ab5
Changes have been made based on the feedback
uko3211 May 29, 2025
ae37831
Changes have been made based on the feedback and fixed mistake
uko3211 May 29, 2025
6a45089
Merge branch 'master' into fix/attrs-init-overload
uko3211 May 30, 2025
7f8d33c
Fixed an issue where overly permissive Any return types were masking …
uko3211 Jun 7, 2025
2946878
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jun 7, 2025
eba288b
Fixed an issue where overly permissive Any return types were masking …
uko3211 Jun 7, 2025
2bb782c
Update check-plugin-attrs.test file
uko3211 Jun 7, 2025
423e526
Revised version of attrs.py based on the feedback
uko3211 Jun 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added error test case for overloaded custom __init__
  • Loading branch information
uko3211 committed May 21, 2025
commit ad415cbdfec98ac3e6b4cc094e5064a8ed581a3a
6 changes: 3 additions & 3 deletions test-data/unit/check-plugin-attrs.test
Original file line number Diff line number Diff line change
Expand Up @@ -2518,8 +2518,8 @@ class C:


obj = C(1)
attrs.evolve(obj, x=2) # E: Argument 1 to "evolve" has incompatible type "C"; expected an attrs class
attrs.evolve(obj, x="2") # E: Argument 1 to "evolve" has incompatible type "C"; expected an attrs class
attrs.evolve(obj, x=2)
attrs.evolve(obj, x="2")
[builtins fixtures/plugin_attrs.pyi]

[case testAttrsInitOverload2]
Expand All @@ -2542,5 +2542,5 @@ class C:
self.__attrs_init__(x)

obj = C(1)
attrs.evolve(obj, x=2) # E: Argument 1 to "evolve" has incompatible type "C"; expected an attrs class
attrs.evolve(obj, x=2)
[builtins fixtures/plugin_attrs.pyi]
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy