Skip to content
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

Add datetime.date and datetime.datetime specializations #1003

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

alippai
Copy link

@alippai alippai commented Sep 13, 2024

@twoertwein
Copy link
Member

Can you please add runtime tests in https://github.com/pandas-dev/pandas-stubs/blob/main/tests/test_timefuncs.py

You will also need to re-order the overloads to have the more specifiy overloads before more general overloads as type checker pick the first fitting overload (see the mypy errors).

@alippai
Copy link
Author

alippai commented Sep 14, 2024

@twoertwein thanks, I've updated the failing test and added the two cases brought up in the initial issue. Looks like datetime is a subclass of date so I just removed that, it could fix the overloads.

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.

BDay typing
2 participants