Skip to content
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

Remove 'from __future__ import annotations' #22125

Closed
wants to merge 1 commit into from

Conversation

hawkinsp
Copy link
Member

No description provided.

@hawkinsp hawkinsp requested a review from jakevdp June 26, 2024 21:39
@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels Jun 26, 2024
@hawkinsp
Copy link
Member Author

Hmm. Apparently this change isn't a no-op. I guess definition ordering matters?

@jakevdp
Copy link
Collaborator

jakevdp commented Jun 26, 2024

Lint failures are because ruff is linting in Python 3.9:

target-version = "py39"

@jakevdp
Copy link
Collaborator

jakevdp commented Jun 26, 2024

Oh, but maybe the future annotations import is still needed to get the behavior of https://peps.python.org/pep-0649/

@jakevdp
Copy link
Collaborator

jakevdp commented Jun 26, 2024

ruff fix in #22126

@superbobry
Copy link
Member

Yeah, we still need that import in some cases and tbh it's probably a good idea to have it by default to avoid paying the runtime cost of type annotations.

@hawkinsp hawkinsp closed this Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kokoro:force-run pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants