Skip to content

TYP: offsets.WeekOfMonth needs better typing #46908

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

Closed
Dr-Irv opened this issue Apr 30, 2022 · 0 comments · Fixed by #46920
Closed

TYP: offsets.WeekOfMonth needs better typing #46908

Dr-Irv opened this issue Apr 30, 2022 · 0 comments · Fixed by #46920
Assignees
Labels
Frequency DateOffsets Typing type annotations, mypy/pyright type checking

Comments

@Dr-Irv
Copy link
Contributor

Dr-Irv commented Apr 30, 2022

For @twoertwein

I was doing some work with frequencies and discovered pd.tseries.offsets.WeekOfMonth and then see that it is not typed correctly in pandas._libs.tseries.offsets.pyi . Constructor is:

def __init__(self, n=1, normalize=False, week=0, weekday=0)

Right now, it picks up the constructor for BaseOffset which is:

def __init__(self, n: int = ..., normalize: bool = ...) -> None: ...

I'm guessing there might be other classes in offsets.pyi that have issues like this, but I'm not sure.

@Dr-Irv Dr-Irv added Frequency DateOffsets Typing type annotations, mypy/pyright type checking labels Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Frequency DateOffsets Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants