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

chore: remove type annotations for Enums #1219

Merged
merged 2 commits into from
Jan 7, 2025
Merged

chore: remove type annotations for Enums #1219

merged 2 commits into from
Jan 7, 2025

Conversation

jackwotherspoon
Copy link
Collaborator

@jackwotherspoon jackwotherspoon commented Jan 7, 2025

Lint job is complaining:

google/cloud/sql/connector/enums.py:23: error: Enum members must be left unannotated  [misc]

Enums should not be type hinted.

Since our Enums are of type str we should be using enum.StrEnum
but it was only added in Python 3.11. Added a TODO for the future.

@jackwotherspoon jackwotherspoon self-assigned this Jan 7, 2025
@jackwotherspoon jackwotherspoon requested a review from a team as a code owner January 7, 2025 17:57
@jackwotherspoon jackwotherspoon changed the title refactor: use StrEnum over Enum chore: remove type annotations for Enums Jan 7, 2025
@jackwotherspoon jackwotherspoon merged commit 3b66c5a into main Jan 7, 2025
15 checks passed
@jackwotherspoon jackwotherspoon deleted the enum-lint branch January 7, 2025 19:20
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