Skip to content

PERF: use from __future__ import annotations more #36091

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

Closed

Conversation

simonjayhawkins
Copy link
Member

xref #36034 (comment)

@WillAyd using python -X importtime -c "import pandas" I don't see any different in import time after running a few times and things are cached.

so I don't think we gain anything from a performance POV and therefore only need to use it for stylistic reasons in a few modules and not across the codebase.

I've opened this PR, in case someone wants to test performance with these changes.

so feel free to close

@WillAyd
Copy link
Member

WillAyd commented Sep 3, 2020

Rather than do this in every module I think should just do where it actually makes a difference for annotations

@WillAyd WillAyd added the Typing type annotations, mypy/pyright type checking label Sep 3, 2020
@simonjayhawkins
Copy link
Member Author

yep. that's my conclusion. feel free to close

@WillAyd
Copy link
Member

WillAyd commented Sep 3, 2020

OK sure - can come back to this if that doesn't work out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Typing type annotations, mypy/pyright type checking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants