-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYPING: change to FrameOrSeries Alias in pandas._typing #28173
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
TYPING: change to FrameOrSeries Alias in pandas._typing #28173
Conversation
Scalar = Union[str, int, float] | ||
Axis = Union[str, int] | ||
Ordered = Optional[bool] | ||
_T = TypeVar("_T") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you just add a quick inline comment for the purpose of this one? May be useful for those who haven't invested a lot of time in annotations yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
something like
# Unconstrained type variable for generic functions and user-defined generic types.
# see https://docs.python.org/3/library/typing.html#generics and
# https://docs.python.org/3/library/typing.html#typing.TypeVar for more info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally less technical. Maybe something like # to maintain type information across generic functions and parametrization
or even slightly less technical if possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Thanks @simonjayhawkins |
xref #27646 (review)
cc @WillAyd