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:
@@ -86,7 +86,7 @@ class Tiles(HTTPSpotProvider):
|
||||
response = requests.post(self.SUBMIT_URL, json=body, headers=headers, timeout=(5, 30))
|
||||
if not response.ok:
|
||||
raise RuntimeError(
|
||||
"Tiles on the Air API returned " + str(response.status_code) + ": " + response.text)
|
||||
f"Tiles on the Air API returned {response.status_code!s}: {response.text}")
|
||||
else:
|
||||
raise RuntimeError("The Tiles on the Air API requires a mode to be set.")
|
||||
else:
|
||||
@@ -100,4 +100,4 @@ def strip_extra_decimal_points(s):
|
||||
parts = s.split('.', 1)
|
||||
if len(parts) == 1:
|
||||
return s
|
||||
return parts[0] + '.' + parts[1].replace('.', '')
|
||||
return f"{parts[0]}.{parts[1].replace('.', '')}"
|
||||
|
||||
Reference in New Issue
Block a user