-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP: libinterval #41059
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: libinterval #41059
Conversation
is something awry with mypy or do you know what changes here cause issues with the doc decorator. |
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.
maybe break off the io changes for now
no idea whats making mypy complain |
IIRC i did only what was necessary to get mypy to stop complaining about interval.pyi |
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.
maybe break off the io changes for now
IIRC i did only what was necessary to get mypy to stop complaining about interval.pyi
we can't merge this with all these error: Cannot determine type of
ignores that have appeared. not sure what else to suggest.
IIUC mypy's complaint is bc e.g. |
@simonjayhawkins i think the reason why so many new mypy complaints are popping up is because |
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.
can you rebase. this is a lot of change, not sure if easier to do in pieces.
@@ -84,10 +86,10 @@ | |||
|
|||
# scalars | |||
|
|||
PythonScalar = Union[str, int, float, bool] | |||
PythonScalar = Optional[Union[str, int, float, complex, bool, date, time, timedelta]] |
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.
instead of Optional, can you use type(None) to be more explict?
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.
should just do a pass to modernize this entire file
Haven't found a good way to do this. bc this is the last thing that mypy doesnt recognize in pd._typing.Scalar, it means a bunch of things that currently resolve to Any are now recognized. I'll keep trying this periodically, but for the time being this is on the backburner. |
pandas/io/parsers/python_parser.py
Outdated
@@ -1,3 +1,5 @@ | |||
from __future__ import annotations |
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.
could do this and pandas/io/parsers/base_parser.py in a pre-cursor to reduce the noise here.
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.
will do
can pandas/_libs/tslibs/nattype.pyi or pandas/_libs/interval.pyi be added in seperate PRs. also it is possible to partially type a stub so that could be get some of this in. https://github.com/python/typeshed/blob/master/CONTRIBUTING.md#incomplete-stubs |
Mothballing to clear the queue, as there is no clear path forward here. |
This one is pretty ugly.