Skip to content

Commit

Permalink
Add __init__ definition for AttributeError (#8801)
Browse files Browse the repository at this point in the history
Since Python 3.10, AttributeError supports keyword arguments for name
and obj.
  • Loading branch information
klaseskilson authored Sep 28, 2022
1 parent 4022337 commit 26ea6b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1825,6 +1825,7 @@ class AssertionError(_StandardError): ...

class AttributeError(_StandardError):
if sys.version_info >= (3, 10):
def __init__(self, *args: object, name: str | None = ..., obj: object = ...) -> None: ...
name: str
obj: object

Expand Down

0 comments on commit 26ea6b8

Please sign in to comment.