aboutsummaryrefslogtreecommitdiffstats
path: root/fnme/station.py
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2026-05-04 23:21:18 +0100
committerAlex Schofield <git@ajschof.me>2026-05-04 23:21:18 +0100
commitdbdc06cab87218246ee567dc180b09cd483a950e (patch)
treeab4a3176fa9bf8caaabefe054fab701e246eb2a4 /fnme/station.py
parent962e2e57fe16e51b03e9fbd6d4b9de626e01b49b (diff)
downloadfuelnearme-dbdc06cab87218246ee567dc180b09cd483a950e.tar.gz
fuelnearme-dbdc06cab87218246ee567dc180b09cd483a950e.zip
ruff auto fix (UP035/UP006/F401)
Diffstat (limited to 'fnme/station.py')
-rw-r--r--fnme/station.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/fnme/station.py b/fnme/station.py
index 6f5427a..75afc6f 100644
--- a/fnme/station.py
+++ b/fnme/station.py
@@ -1,5 +1,5 @@
import math
-from typing import Any, Dict, List, Tuple
+from typing import Any
import numpy as np
import pandas as pd
@@ -10,7 +10,7 @@ _PRICE_KEYS = ("e5_price", "e10_price", "diesel_price")
def _bounding_box(
- dframe: pd.DataFrame, loc: Tuple[float, float], rad: int
+ dframe: pd.DataFrame, loc: tuple[float, float], rad: int
) -> pd.DataFrame:
lat, lon = loc
deg_lat = rad / 69.0
@@ -26,7 +26,7 @@ def _bounding_box(
def _haversine_miles(
- loc: Tuple[float, float], lat2: np.ndarray, lon2: np.ndarray
+ loc: tuple[float, float], lat2: np.ndarray, lon2: np.ndarray
) -> np.ndarray:
R = 3958.8
lat1, lon1 = np.radians(loc[0]), np.radians(loc[1])
@@ -45,8 +45,8 @@ def _pence_to_pounds(col: pd.Series) -> pd.Series:
def process_stations(
- dframe: pd.DataFrame, rad: int, loc: Tuple[float, float]
-) -> List[Dict[str, Any]]:
+ dframe: pd.DataFrame, rad: int, loc: tuple[float, float]
+) -> list[dict[str, Any]]:
df = _bounding_box(dframe, loc, rad).copy()
git.ajschof.me — hosted by ajschofield — powered by cgit