-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP: freq and na_value #47729
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
TYP: freq and na_value #47729
Conversation
pandas/core/arrays/datetimes.py
Outdated
cls, values: np.ndarray, freq: BaseOffset | None = None, dtype=DT64NS_DTYPE | ||
cls, | ||
values: np.ndarray, | ||
freq: str | BaseOffset | lib.NoDefault | None = None, |
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.
@jbrockmendel should the caller ensure the freq
is not a string when calling _simple_new
?
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.
this should be BaseOffset | None
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.
Thank you, I changed it!
Thanks @twoertwein |
Type annotations are only related by having
lib.no_default
as a default value (pyright then assumes that their type islib.NoDefault
).