use pandas.api.typing.aliases#1668
Conversation
|
PR for pandas is here: pandas-dev/pandas#64098 |
loicdiridollou
left a comment
There was a problem hiding this comment.
Overall good, just let me know about this tests/_typing.py file.
Other question, should we wait for your PR on the pandas repo to go through to merge this one or not?
| @@ -1,171 +1,1263 @@ | |||
| # ruff: noqa: PLC0414 | |||
There was a problem hiding this comment.
Do we want to make the changes to this file? Always confused if it needs to be committed or not
There was a problem hiding this comment.
No - that was my mistake.
That was a mistake - should not have committed it.
No, because we'd still have to wait for the release of pandas 3.0.1 or 3.1. Once that release happens with the changes there, I can update |
With 3.0, the goal of adding
pandas.api.typing.aliaseswas to get people to stop importing frompandas._typing. This PR adds the aliases, and modifies the tests to import from that module.There are a few aliases that need to be added back into pandas, which I will handle via a PR there
IntervalClosedTypeIntervalLeftRightListLikeScalarIndexerSequenceIndexerOnce a new version of pandas is released with those changes, we can modify the tests that need to use
TYPE_CHECKINGto no longer need them.