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

(🎁) StubGenerator.add_typing_import returns the name #15912

Merged
merged 1 commit into from
Aug 21, 2023

Conversation

KotlinIsland
Copy link
Contributor

I noticed that almost all calls to typing_name also call add_typing_import.

Copy link
Collaborator

@hamdanal hamdanal left a comment

Choose a reason for hiding this comment

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

I am not a mypy maintainer but this LGTM.
The old pattern always bothered me because it is not DRY and wastes a function call (and I am responsible for most of its usage :D)

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Seems like a nice refactoring.

@sobolevn sobolevn merged commit 2c1fd97 into python:master Aug 21, 2023
12 checks passed
@KotlinIsland KotlinIsland deleted the stubgen-add-typing-import branch August 21, 2023 13:32
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