colorama: re-export just_fix_windows_console at top level#9234
Merged
AlexWaygood merged 2 commits intoNov 21, 2022
Conversation
Added here: tartley/colorama#352 Re-export can be seen here: https://github.com/tartley/colorama/blob/21c4b94fe21ce29c85c896ace828da24b7527641/colorama/__init__.py#L2 I don't know why all the exports are "X as X" instead of just "X", but I followed the same style for consistency.
AlexWaygood
approved these changes
Nov 21, 2022
Member
There was a problem hiding this comment.
Thanks!
I don't know why all the exports are "X as X" instead of just "X", but I followed the same style for consistency.
In stubs, all imports are generally considered by type checkers to be "private to the stub" (I.e., they generally don't represent a symbol that's being exported, that an end user of the stubs would be able to access). Using the "redundant" from foo import bar as bar idiom is one of several ways PEP 484 lays out to indicate to a type checker that these imports are in fact public re-exports that an end user would be able to use at runtime.
TL;DR: You did the right thing.
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added here: tartley/colorama#352
Re-export can be seen here:
https://github.com/tartley/colorama/blob/21c4b94fe21ce29c85c896ace828da24b7527641/colorama/__init__.py#L2
I don't know why all the exports are "X as X" instead of just "X", but I followed the same style for consistency.