Skip to content

TYP: use annotations in strprime.pyi and timestamps.pyi #41841

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

Merged

Conversation

fangchenli
Copy link
Member

No description provided.

@fangchenli fangchenli added the Typing type annotations, mypy/pyright type checking label Jun 6, 2021
Copy link
Member

@jbrockmendel jbrockmendel left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

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

Thanks @fangchenli lgtm

exact: bool = True,
errors: str = "raise"
errors: str = "raise",
Copy link
Member

Choose a reason for hiding this comment

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

while cleaning these stubs can also remove the default values and just use ...

from https://github.com/python/typeshed/blob/master/CONTRIBUTING.md#conventions

Stub files should only contain information necessary for the type checker, and leave out unnecessary detail:

for arguments with a default, use ... instead of the actual default;

@simonjayhawkins simonjayhawkins added this to the 1.3 milestone Jun 8, 2021
@simonjayhawkins simonjayhawkins merged commit bcae446 into pandas-dev:master Jun 8, 2021
@fangchenli fangchenli deleted the pyi-tslibs-annotations branch June 18, 2021 02:24
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
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.

3 participants