Skip to content

type tz in tz_convert, tz_localize, date_range, and bdate_range #1118

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 1 commit into from
Feb 13, 2025

Conversation

MarcoGorelli
Copy link
Member

  • Closes #xxxx (Replace xxxx with the Github issue number)
  • Tests added: Please use assert_type() to assert the type of any return value

@@ -820,4 +821,6 @@ TimeGrouperOrigin: TypeAlias = (
ExcelReadEngine: TypeAlias = Literal["xlrd", "openpyxl", "odf", "pyxlsb", "calamine"]
ExcelWriteEngine: TypeAlias = Literal["openpyxl", "odf", "xlsxwriter"]

TimeZones: TypeAlias = str | tzinfo | None | int
Copy link
Member Author

Choose a reason for hiding this comment

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

the related (private, for some reason?) alias in pandas is _TimeZones:

https://github.com/pandas-dev/pandas/blob/67872451d9a195c801c2395c92dab27edb3ecbbe/pandas/_libs/tslibs/timestamps.pyi#L30

I think TimeZone would be more accurate? I don't really mind, just explaining why I used the plural and where it comes from

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's fine

@MarcoGorelli MarcoGorelli marked this pull request as ready for review February 13, 2025 15:32
Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

Thanks @MarcoGorelli . Nice find that we were missing the types in multiple places.

@Dr-Irv Dr-Irv merged commit b5d6fea into pandas-dev:main Feb 13, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants