flynt pass to provide consistency to string formatters and concatenation

This commit is contained in:
Ian Renton
2026-08-15 07:55:32 +01:00
parent bff5b79f8f
commit 7391c28cd0
72 changed files with 184 additions and 193 deletions
+3 -3
View File
@@ -68,14 +68,14 @@ def get_sig_ref_info(sig, ref_id):
if not sig_ref.name:
sig_ref.name = sig_ref.id
if sig_ref.name:
sig_ref.url = "https://www.beachesontheair.com/beaches/" + sig_ref.name.lower().replace(" ", "-")
sig_ref.url = f"https://www.beachesontheair.com/beaches/{sig_ref.name.lower().replace(' ', '-')}"
return sig_ref
### ACTUAL LOOKUP ###
#
# OK, this is something we have to look up. Now check to see if our data store contains reference data and use
# that.
key = sig + ":" + ref_id
key = f"{sig}:{ref_id}"
lookup_data = DATA_STORE.sigrefs.get(key) if key in DATA_STORE.sigrefs else None
if lookup_data:
return lookup_data
@@ -86,7 +86,7 @@ def get_sig_ref_info(sig, ref_id):
logging.debug("%s database did not contain data for ref %s", sig, ref_id)
except Exception:
logging.exception("Exception when looking up sig_ref info for " + sig + " ref " + ref_id)
logging.exception(f"Exception when looking up sig_ref info for {sig} ref {ref_id}")
return sig_ref