diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 36c148a..6e146bf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + rev: v4.4.0 hooks: - id: check-yaml - id: end-of-file-fixer @@ -8,7 +8,7 @@ repos: - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.3.0 hooks: - id: black @@ -19,7 +19,7 @@ repos: args: ["--py38-plus"] - repo: https://github.com/hadialqattan/pycln - rev: "v2.1.2" + rev: "v2.1.3" hooks: - id: pycln args: [--config=pyproject.toml] @@ -27,7 +27,7 @@ repos: - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.991 + rev: v1.1.1 hooks: - id: mypy files: ".+.py" diff --git a/pgeocode.py b/pgeocode.py index 2670580..69f0911 100644 --- a/pgeocode.py +++ b/pgeocode.py @@ -202,7 +202,6 @@ class Nominatim: """ def __init__(self, country: str = "fr", unique: bool = True): - country = country.upper() if country not in COUNTRIES_VALID: raise ValueError( @@ -259,7 +258,6 @@ def _index_postal_codes(self) -> pd.DataFrame: data_path_unique, dtype={"postal_code": str} ) else: - # group together places with the same postal code df_unique_cp_group = self._data.groupby("postal_code") data_unique = df_unique_cp_group[["latitude", "longitude"]].mean() diff --git a/test_pgeocode.py b/test_pgeocode.py index 72f5003..7ba37bb 100644 --- a/test_pgeocode.py +++ b/test_pgeocode.py @@ -133,7 +133,6 @@ def test_nominatim_all_countries(country): def test_nominatim_distance_postal_code(): - gdist = GeoDistance("fr") dist = gdist.query_postal_code("91120", "91120")