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

Avoid invalid-name when assigned value is a typing module type #1406

Closed
wants to merge 4 commits into from

Conversation

rogalski
Copy link
Contributor

@rogalski rogalski commented Apr 2, 2017

Closes #1290

@rogalski rogalski added this to the 1.7.0 milestone Apr 2, 2017
@rogalski
Copy link
Contributor Author

rogalski commented Apr 2, 2017

I know it's more of a hack than proper solution (those values should be inferred in astroid), but I feel like we need them as soon as possible for 1.7.0 release.

@rogalski rogalski requested a review from PCManticore April 2, 2017 16:24
@rogalski rogalski mentioned this pull request Apr 2, 2017
@@ -139,6 +139,19 @@ def _is_multi_naming_match(match, node_type, confidence):
match.lastgroup not in EXEMPT_NAME_CATEGORIES
and (node_type != 'method' or confidence != interfaces.INFERENCE_FAILURE))

def is_typing_type(obj):
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this should be a brain plugin rather than a specific inference function here? We just need to infer these as classes.

Copy link
Contributor

@PCManticore PCManticore left a comment

Choose a reason for hiding this comment

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

Let's see if we can put the inference function in brain.

@rogalski
Copy link
Contributor Author

rogalski commented Apr 7, 2017

@PCManticore feel free to take over if you want to have it merged reasonable quick. I'll be quite busy next week.

@rogalski
Copy link
Contributor Author

Abandoned.

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

Successfully merging this pull request may close these issues.

2 participants