Skip to content

Update ast.alias _attributes for Python 3.9 #14103

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 1 commit into from
May 20, 2025
Merged
Changes from all commits
Commits
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
18 changes: 11 additions & 7 deletions stdlib/ast.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1429,15 +1429,19 @@ class keyword(AST):
def __replace__(self, *, arg: str | None = ..., value: expr = ..., **kwargs: Unpack[_Attributes]) -> Self: ...

class alias(AST):
lineno: int
col_offset: int
end_lineno: int | None
end_col_offset: int | None
if sys.version_info >= (3, 10):
__match_args__ = ("name", "asname")
name: str
asname: str | None
def __init__(self, name: str, asname: str | None = None, **kwargs: Unpack[_Attributes]) -> None: ...
if sys.version_info >= (3, 10):
lineno: int
col_offset: int
end_lineno: int | None
end_col_offset: int | None
if sys.version_info >= (3, 10):
__match_args__ = ("name", "asname")
if sys.version_info >= (3, 10):
def __init__(self, name: str, asname: str | None = None, **kwargs: Unpack[_Attributes]) -> None: ...
else:
def __init__(self, name: str, asname: str | None = None) -> None: ...

if sys.version_info >= (3, 14):
def __replace__(self, *, name: str = ..., asname: str | None = ..., **kwargs: Unpack[_Attributes]) -> Self: ...
Expand Down