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

Merge lookup_fully_qualified and lookup_fully_qualified_or_none #11205

Merged
merged 10 commits into from
Oct 5, 2021

Conversation

97littleleaf11
Copy link
Collaborator

@97littleleaf11 97littleleaf11 commented Sep 27, 2021

Description

Partially solves #4157

  • SemanticAnalyzerCoreInterface.lookup_fully_qualified seems redundant

@github-actions

This comment has been minimized.

@97littleleaf11
Copy link
Collaborator Author

@hauntsaninja Should we use lookup_fully_qualified instead of lookup_fully_qualified_or_none? There exists other lookup_fully_qualified functions that return optional types. Thus I get rid of or_none for consistency.

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

The change and shorter name seem fine to me. It might be worth doing lookup_fully_qualified_or_none = lookup_fully_qualified in SemanticAnalyzer, just to reduce churn / mypy versioning headaches for plugins.

mypy/plugin.py Outdated Show resolved Hide resolved
mypy/plugin.py Outdated Show resolved Hide resolved
mypy/semanal.py Show resolved Hide resolved
mypy/semanal_shared.py Outdated Show resolved Hide resolved
@97littleleaf11 97littleleaf11 requested a review from JukkaL October 4, 2021 16:42
Copy link
Collaborator

@JukkaL JukkaL left a comment

Choose a reason for hiding this comment

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

Thanks for the updates! The PR looks nice and tidy now. Sorry for the extra iterations, but I think that the end result makes it worth it.

@JukkaL JukkaL merged commit d1d4316 into python:master Oct 5, 2021
@97littleleaf11 97littleleaf11 deleted the remove-lookup-fully-qualified branch October 6, 2021 07:01
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.

3 participants