Skip to content

TYP: use type annotations in tzconversion.pyi #41771

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
merged 3 commits into from
Jun 2, 2021

Conversation

fangchenli
Copy link
Member

No description provided.

@@ -1,25 +1,21 @@
from __future__ import annotations
Copy link
Member

Choose a reason for hiding this comment

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

maybe not needed for stub file. will need to check.

Copy link
Contributor

Choose a reason for hiding this comment

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

don't we need for the | syntax?

Copy link
Member

Choose a reason for hiding this comment

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

a .pyi is not parsed when running pandas. It is only used by mypy (or other type checkers). The syntax of a .pyi file is not constrained by the minimum python interpreter supported by pandas.

Copy link
Member

@simonjayhawkins simonjayhawkins Jun 2, 2021

Choose a reason for hiding this comment

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

will need to check.

running pre-commit we don't have any rules that prohibit doing this.

@fangchenli fangchenli added the Typing type annotations, mypy/pyright type checking label Jun 1, 2021
@jreback jreback added this to the 1.3 milestone Jun 2, 2021
@jreback jreback merged commit 2003d93 into pandas-dev:master Jun 2, 2021
@fangchenli fangchenli deleted the tzconversion-annotations branch June 18, 2021 02:25
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