mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 14:27:42 +00:00
flynt pass to provide consistency to string formatters and concatenation
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user