You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue is that the type specification for the weekday argument in pandas-stubs/_libs/tslibs/offsets.pyi says that weekday is an int. But it can be a weekday class or an int. See https://dateutil.readthedocs.io/en/stable/relativedelta.html To fix this, we have to make types-python-dateutil a dependency, which involves modifying pyproject.toml and takes some care.
In quite a few cases, the code seems to explicitly test that weekday is between 0 and 6 (WeekOfMonthMixin, Week, WeekOfMonth).
For the other ones you mentioned, there is a type check at the __init__ so you can only pass a weekday class from dateutil.relativedelta in pd.DateOffset. Let me know if I missed anything!
The issue is that the type specification for the
weekday
argument inpandas-stubs/_libs/tslibs/offsets.pyi
says thatweekday
is anint
. But it can be aweekday
class or anint
. See https://dateutil.readthedocs.io/en/stable/relativedelta.html To fix this, we have to maketypes-python-dateutil
a dependency, which involves modifyingpyproject.toml
and takes some care.Created a docs issue for pandas at pandas-dev/pandas#52650
Originally posted by @Dr-Irv in #645 (comment)
The text was updated successfully, but these errors were encountered: