aboutsummaryrefslogtreecommitdiffstats
path: root/fnme/cli.py
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2026-05-04 23:15:16 +0100
committerAlex Schofield <git@ajschof.me>2026-05-04 23:15:16 +0100
commitb8a884147a4b7f356ae1eb5745f644369f7908a3 (patch)
treead78f9e6d414ac03f527bd52c80421e1781b91e4 /fnme/cli.py
parentcc3a9b54e32113c4e7f3616d7e6350e432b1aa1c (diff)
downloadfuelnearme-b8a884147a4b7f356ae1eb5745f644369f7908a3.tar.gz
fuelnearme-b8a884147a4b7f356ae1eb5745f644369f7908a3.zip
use ruff to adjust line length
Diffstat (limited to 'fnme/cli.py')
-rw-r--r--fnme/cli.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/fnme/cli.py b/fnme/cli.py
index 203391c..3d7d72e 100644
--- a/fnme/cli.py
+++ b/fnme/cli.py
@@ -15,14 +15,20 @@ _PRICE_COLS = {
"diesel_price": "B7S (£/L)",
}
-_HEADERS = {"station_name": "Station Name", "distance": "Distance (mi)", **_PRICE_COLS}
+_HEADERS = {
+ "station_name": "Station Name",
+ "distance": "Distance (mi)",
+ **_PRICE_COLS,
+}
def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser()
parser.add_argument("-a", "--address", type=str, required=True)
parser.add_argument("-r", "--radius", type=int, default=5)
- parser.add_argument("-s", "--sort", type=str, default="e10", choices=SORT_KV.keys())
+ parser.add_argument(
+ "-s", "--sort", type=str, default="e10", choices=SORT_KV.keys()
+ )
return parser.parse_args()
@@ -35,7 +41,10 @@ def output_stations(stations: List[Dict[str, Any]]) -> None:
print("[*] No stations found.")
return
- rows = [{**s, **{col: _fmt_price(s[col]) for col in _PRICE_COLS}} for s in stations]
+ rows = [
+ {**s, **{col: _fmt_price(s[col]) for col in _PRICE_COLS}}
+ for s in stations
+ ]
print(tabulate(rows, headers=_HEADERS, floatfmt="1.f"))
git.ajschof.me — hosted by ajschofield — powered by cgit