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

refactor: add ConnectionName class #1186

Merged
merged 3 commits into from
Nov 1, 2024
Merged

Conversation

jackwotherspoon
Copy link
Collaborator

This PR refactors all instance connection name related code into
its own file connection_name.py.

It introduces the ConnectionName class which will make tracking
if a DNS name was given to the Connector easier in the future.

This change also aligns the Python Connector more closely to its
Go counterpart's conn_name.go for easier maintainability.

Related to #1169

@jackwotherspoon jackwotherspoon self-assigned this Nov 1, 2024
@jackwotherspoon jackwotherspoon requested a review from a team as a code owner November 1, 2024 15:39
@@ -51,6 +51,7 @@ def lint(session):
"--check-only",
"--diff",
"--profile=google",
"-w=88",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

black formatter uses line-length of 88 while isort was using 85, setting isort to 88 as well.

Found this as the new import for _parse_instance_connection_name was 87 characters and causing isort and black to argue with one another.

@jackwotherspoon jackwotherspoon merged commit ef7d8fe into main Nov 1, 2024
15 checks passed
@jackwotherspoon jackwotherspoon deleted the refactor-conn-name branch November 1, 2024 15:54
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