Skip to content

Commit

Permalink
to avoid type's mismatch durind concatenation modified to f-strings (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
igeni committed Mar 22, 2024
1 parent 5344881 commit 6a225cc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions airflow/cli/commands/info_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def process_path(self, value) -> str:
def process_username(self, value) -> str:
if not value:
return value
return value[0] + "..." + value[-1]
return f"{value[0]}...{value[-1]}"

def process_url(self, value) -> str:
if not value:
Expand Down Expand Up @@ -114,11 +114,11 @@ def process_url(self, value) -> str:

# pack
if username and password and host:
netloc = username + ":" + password + "@" + host
netloc = f"{username}:{password}@{host}"
elif username and host:
netloc = username + "@" + host
netloc = f"{username}@{host}"
elif password and host:
netloc = ":" + password + "@" + host
netloc = f":{password}@{host}"
elif host:
netloc = host
else:
Expand Down Expand Up @@ -217,7 +217,7 @@ def get_fullname(o):
if module is None or module == str.__class__.__module__:
return o.__class__.__name__ # Avoid reporting __builtin__
else:
return module + "." + o.__class__.__name__
return f"{module}.{o.__class__.__name__}"

try:
handler_names = [get_fullname(handler) for handler in logging.getLogger("airflow.task").handlers]
Expand Down

0 comments on commit 6a225cc

Please sign in to comment.