Skip to content
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

Use explicit __all__ for astroid.nodes #1083

Merged
merged 1 commit into from Jun 30, 2021

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Jun 30, 2021

Description

A computed __all__ for astroid.nodes doesn't work for pylance as it can't infer the names.

Type of Changes

Type
βœ“ πŸ› Bug fix
βœ“ πŸ”¨ Refactoring

Related Issue

#1067 (comment)

@cdce8p cdce8p marked this pull request as ready for review June 30, 2021 20:11
@cdce8p cdce8p added the task label Jun 30, 2021
@cdce8p cdce8p added this to the 2.6.3 milestone Jun 30, 2021
@cdce8p
Copy link
Member Author

cdce8p commented Jun 30, 2021

@Pierre-Sassoulas Would you mind taking a look at this one? I know you mentioned an issue with cyclic-imports but from my testing so far, everything seems to be fine. Even with this change applied to #1057. Am I missing something?

@Pierre-Sassoulas
Copy link
Member

The cyclic import is not a real one, it's detected by pylint due to this problem

@Pierre-Sassoulas Pierre-Sassoulas merged commit 3f98fa0 into pylint-dev:master Jun 30, 2021
@cdce8p
Copy link
Member Author

cdce8p commented Jun 30, 2021

The cyclic import is not a real one, it's detected by pylint due to this problem

Strange, I'm not getting any error. Besides neither scoped_nodes nor node_classes uses TYPE_CHECKING

@cdce8p cdce8p deleted the nodes-all branch June 30, 2021 20:20
@Pierre-Sassoulas
Copy link
Member

There is a pragma to prevent isort from mixing the import order in astroid.__init__.py, so that may be why it does not appear ? I'll check that when pylint 2.9.0 do not have crashes anymore :)

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.

None yet

2 participants