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

Mark constants as final #2126

Merged
merged 1 commit into from
Feb 24, 2023
Merged

Conversation

michael-k
Copy link
Contributor

@michael-k michael-k commented Feb 22, 2023

mypy (don't know about pyright) treats Delete = "Delete" as Delete: str = "Delete" for backwards compatibility, see https://mypy.readthedocs.io/en/stable/literal_types.html#declaring-literal-variables.

Delete: Final = "Delete" is the same as Delete: Literal["Delete"] = "Delete".

@markpeek
Copy link
Member

Apologies @michael-k as merge of #2124 caused conflicts in constants.py. I'm hoping it is a quick edit to get it fixed up again.

@michael-k
Copy link
Contributor Author

No worries. I need to fix some type errors anyway.

@markpeek markpeek merged commit a21e2be into cloudtools:main Feb 24, 2023
@markpeek
Copy link
Member

Thanks!

@michael-k michael-k deleted the final-constants branch March 2, 2023 12:39
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