Skip to content

Commit 9cc8a8b

Browse files
fix: run ruff format on config_template.py to resolve formatting issues
1 parent eb08d92 commit 9cc8a8b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

archipy/configs/config_template.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ def extract_connection_parts(self) -> "SqlAlchemyConfig":
249249

250250
# Extract username and password
251251
if parsed.netloc:
252-
auth_part = parsed.netloc.split('@')[0] if '@' in parsed.netloc else ''
253-
if ':' in auth_part:
254-
username, password = auth_part.split(':', 1)
252+
auth_part = parsed.netloc.split("@")[0] if "@" in parsed.netloc else ""
253+
if ":" in auth_part:
254+
username, password = auth_part.split(":", 1)
255255
if self.USERNAME is None:
256256
self.USERNAME = username
257257
if self.PASSWORD is None:
@@ -260,9 +260,9 @@ def extract_connection_parts(self) -> "SqlAlchemyConfig":
260260
self.USERNAME = auth_part
261261

262262
# Extract host and port
263-
host_part = parsed.netloc.split('@')[-1] if '@' in parsed.netloc else parsed.netloc
264-
if ':' in host_part:
265-
host, port_str = host_part.split(':', 1)
263+
host_part = parsed.netloc.split("@")[-1] if "@" in parsed.netloc else parsed.netloc
264+
if ":" in host_part:
265+
host, port_str = host_part.split(":", 1)
266266
if self.HOST is None:
267267
self.HOST = host
268268
if self.PORT is None:
@@ -274,7 +274,7 @@ def extract_connection_parts(self) -> "SqlAlchemyConfig":
274274
self.HOST = host_part
275275

276276
# Extract database name
277-
if self.DATABASE is None and parsed.path and parsed.path.startswith('/'):
277+
if self.DATABASE is None and parsed.path and parsed.path.startswith("/"):
278278
self.DATABASE = parsed.path[1:]
279279

280280
return self

0 commit comments

Comments
 (0)