Skip to content

Removed unnecessary quotes from type annotation#6540

Merged
squidfunk merged 1 commit intosquidfunk:masterfrom
sisp:build/remove-quotes-from-type-annotation
Dec 19, 2023
Merged

Removed unnecessary quotes from type annotation#6540
squidfunk merged 1 commit intosquidfunk:masterfrom
sisp:build/remove-quotes-from-type-annotation

Conversation

@sisp
Copy link
Copy Markdown
Contributor

@sisp sisp commented Dec 19, 2023

I've remove unnecessary quotes from a type annotation.

@squidfunk When you were questioning Python 3.8 compatibility yesterday, I thought this unquoted type isn't compatible, but I missed the from __future__ import annotations import, which does make it compatible. See a simple mypy playground example. When you remove that import, mypy will fail. I've also tested this snippet at runtime under Python 3.8, it works with the import but fails without the import.

@squidfunk
Copy link
Copy Markdown
Owner

Great, thanks!

@squidfunk squidfunk merged commit 6a2b62b into squidfunk:master Dec 19, 2023
@sisp sisp deleted the build/remove-quotes-from-type-annotation branch December 19, 2023 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants