Skip to content

Fix F403 wildcart import used in astroid/__init__.py #1271

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 5 commits into from
Mar 3, 2022

Conversation

Pierre-Sassoulas
Copy link
Member

Description

Type of Changes

Type
🔨 Refactoring

Related Issue

Follow up to #1240

And apply flake8 on setup.py and astroid/__init__.py
@Pierre-Sassoulas Pierre-Sassoulas added the Maintenance Discussion or action around maintaining astroid or the dev workflow label Nov 21, 2021
@Pierre-Sassoulas
Copy link
Member Author

It look like removing the wildcart import made pylint realize about a number of pre-existing issues !

@Pierre-Sassoulas Pierre-Sassoulas added the High effort 🏋 Difficult solution or problem to solve label Nov 21, 2021
@Pierre-Sassoulas
Copy link
Member Author


************* Module tests.unittest_scoped_nodes
tests/unittest_scoped_nodes.py:283:12: E1101: Instance of 'Module' has no 'file_stream' member (no-member)
************* Module tests.unittest_builder
tests/unittest_builder.py:556:40: E1101: Instance of 'EmptyNode' has no 'locals' member (no-member)
tests/unittest_builder.py:557:40: E1101: Instance of 'EmptyNode' has no 'instance_attrs' member (no-member)
tests/unittest_builder.py:559:40: E1101: Instance of 'EmptyNode' has no 'locals' member (no-member)
tests/unittest_builder.py:560:40: E1101: Instance of 'EmptyNode' has no 'instance_attrs' member (no-member)
************* Module tests.unittest_lookup
tests/unittest_lookup.py:397:35: E1101: Instance of 'EmptyNode' has no '_proxied' member (no-member)
************* Module astroid.inference
astroid/inference.py:878:12: R0204: Redefinition of retval type from bool to astroid.util.Uninferable (redefined-variable-type)
************* Module tests.unittest_nodes
tests/unittest_nodes.py:632:30: E1101: Instance of 'EmptyNode' has no '_proxied' member (no-member)
tests/unittest_nodes.py:633:25: E1101: Instance of 'EmptyNode' has no '_proxied' member (no-member)
tests/unittest_nodes.py:634:22: E1101: Instance of 'EmptyNode' has no 'value' member (no-member)
tests/unittest_nodes.py:635:24: E1101: Instance of 'EmptyNode' has no '_proxied' member (no-member)
tests/unittest_nodes.py:636:25: E1101: Instance of 'EmptyNode' has no '_proxied' member (no-member)
************* Module astroid.rebuilder
astroid/rebuilder.py:1604:16: R0204: Redefinition of newnode type from astroid.nodes.node_classes.DelAttr to astroid.nodes.node_classes.AssignAttr (redefined-variable-type)
astroid/rebuilder.py:1870:16: R0204: Redefinition of newnode type from astroid.nodes.node_classes.DelName to astroid.nodes.node_classes.AssignName (redefined-variable-type)

@DanielNoord
Copy link
Collaborator

Blocked by #1415.

Most of the other issues come from pylint not handling const_factory very well. It seems to think it can only return EmptyNode and then starts raising a number of no-member warnings.

@DanielNoord DanielNoord added the Blocked 🚧 A PR or issue blocked by another PR or issue label Mar 1, 2022
@DanielNoord
Copy link
Collaborator

@Pierre-Sassoulas This is ready for review!

@DanielNoord DanielNoord removed the Blocked 🚧 A PR or issue blocked by another PR or issue label Mar 3, 2022
Copy link
Member Author

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't approve my own PR but LGTM :)

@Pierre-Sassoulas Pierre-Sassoulas merged commit 58706b5 into main Mar 3, 2022
@Pierre-Sassoulas Pierre-Sassoulas deleted the fix-flake8-f403-in-astroid-__init__.py branch March 3, 2022 11:45
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.11.0 milestone Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High effort 🏋 Difficult solution or problem to solve Maintenance Discussion or action around maintaining astroid or the dev workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants