Skip to content

Re-export code from _ast into ast - #1515

Merged
gvanrossum merged 2 commits into
python:masterfrom
ilinum:reexport_all_in_ast
Aug 3, 2017
Merged

gvanrossum merged 2 commits into
python:masterfrom
ilinum:reexport_all_in_ast

Conversation

@ilinum

@ilinum ilinum commented Aug 3, 2017 •

Copy link
Copy Markdown
Contributor

After mypy started hiding imported names in stubs unless from ... import ... is used, we found an error with stubs of ast module.

It looks like ast module should re-export everything in _ast and according to PEP 484, it can do that by doing from _ast import *, so this is what this PR does.

@gvanrossum

Copy link
Copy Markdown
Member

The flake8 linter doesn't like * imports. I wonder if we should just disable that rule in the config file.

@ilinum

ilinum commented Aug 3, 2017

Copy link
Copy Markdown
Contributor Author

Hmm, I think we should disable the rule.

But if other people think otherwise, I am happy to fix the import.

@gvanrossum

gvanrossum commented Aug 3, 2017 via email

Copy link
Copy Markdown
Member

@ilinum

ilinum commented Aug 3, 2017

Copy link
Copy Markdown
Contributor Author

Submitted #1519 to allow star imports.

@gvanrossum

gvanrossum commented Aug 3, 2017 via email

Copy link
Copy Markdown
Member

@ilinum

ilinum commented Aug 3, 2017

Copy link
Copy Markdown
Contributor Author

Merged and pushed!

@gvanrossum
gvanrossum merged commit 3f9fafb into python:master Aug 3, 2017
@ilinum
ilinum deleted the reexport_all_in_ast branch August 3, 2017 23:17
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