Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update default values for ast.ImportFrom initialization #14308

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 7 commits into
base: main
Choose a base branch
from

Conversation

hunterhogan
Copy link
Contributor

@hunterhogan hunterhogan commented Jun 19, 2025

Addresses #14338

Details

Illustration of ast.ImportFrom.level default value

(.313) C:\clones\typeshed>py
Python 3.13.5 (tags/v3.13.5:6cb20a2, Jun 11 2025, 16:15:46) [MSC v.1943 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ast
>>> yum = ast.ImportFrom('popeyes', [ast.alias('chicken')])
>>> ast.unparse(yum)
'from popeyes import chicken'
>>> print(yum.level)
None

This comment has been minimized.

Co-authored-by: Semyon Moroz <[email protected]>

This comment has been minimized.

@hunterhogan

This comment was marked as duplicate.

…rsion and enhance constructor overloads for better compatibility

This comment has been minimized.

@hunterhogan

This comment was marked as resolved.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@hunterhogan

This comment was marked as resolved.

Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants