align typing with pandas source by Dr-Irv · Pull Request #1219 · pandas-dev/pandas-stubs (original) (raw)
Possibly closes #128
I went through the current pandas source in pandas/_typing.py and separated the types declared there from the "private" types only used in the stubs, which now appear at the bottom of the file, and added documentation where appropriate to indicate where things are different.
Unclear whether the "private" types in the stubs should all be preceded by underscores. They are imported from pandas/_typing, so that makes them private anyway. When I wrote #128, I suggested to make them all private. Now that I have more experience with typing, I don't think it's necessary.
By doing this, I have a list of types that should be "public" which will eventually go in pandas.api.typing.aliases . That will then allow me to work on pandas-dev/pandas#55231
Asking for opinions of @loicdiridollou and a review/approval/merge from @twoertwein