File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments