Skip to content

Conversation

@simonjayhawkins
Copy link
Member

@simonjayhawkins simonjayhawkins added the Typing type annotations, mypy/pyright type checking label Aug 27, 2019
Scalar = Union[str, int, float]
Axis = Union[str, int]
Ordered = Optional[bool]
_T = TypeVar("_T")
Copy link
Member

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

Copy link
Member Author

@simonjayhawkins simonjayhawkins Aug 27, 2019

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.

Copy link
Member

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

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

lgtm!

@WillAyd WillAyd added this to the 1.0 milestone Aug 27, 2019
@WillAyd WillAyd merged commit d91ffa6 into pandas-dev:master Aug 27, 2019
@WillAyd
Copy link
Member

WillAyd commented Aug 27, 2019

Thanks @simonjayhawkins

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

Labels

Typing type annotations, mypy/pyright type checking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants