-
-
Notifications
You must be signed in to change notification settings - Fork 141
Use PEP 604 style annotations #150
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
Comments
My only concern here is compatibility with python 3.8 and 3.9. Maybe we just have to do |
As a first step we could only change pyi files (not the tests). pyi files do not need
Adding the future imports to the tests would be fairly easy as there are only a few (but large) test files. |
You're certainly welcome to try to make the changes in a PR! |
I think a feasible approach would be to first use pre-commit (currently we do not let it re-write annotations) and then manually re-write annotations when flake8-pyi recommends changes (should probably ignore Y037 for now). |
We might consider using the new(er) type annotation system (replace
Union
with|
, uselist
and so on):pandas/_typing.pyi
where we define most/all the type aliases):The text was updated successfully, but these errors were encountered: