From d660f0cc4ed6d9e62d0fe7c6d618322d57a1b049 Mon Sep 17 00:00:00 2001 From: Alexander Hess Date: Mon, 30 Nov 2026 19:53:15 +0100 Subject: [PATCH] Import `googlemaps` as `gm` everywhere --- pyproject.toml | 1 + tests/db/test_addresses_addresses.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4345c8f..ba2ea45 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -545,6 +545,7 @@ banned-from = [ [tool.ruff.lint.flake8-import-conventions.extend-aliases] "collections.abc" = "cabc" +"googlemaps" = "gm" "sqlalchemy" = "sa" "sqlalchemy.dialects.postgresql" = "psql" "sqlalchemy.ext.hybrid" = "sa_hybrid" diff --git a/tests/db/test_addresses_addresses.py b/tests/db/test_addresses_addresses.py index 087547f..7c34bf4 100644 --- a/tests/db/test_addresses_addresses.py +++ b/tests/db/test_addresses_addresses.py @@ -2,7 +2,7 @@ import json -import googlemaps +import googlemaps as gm import pytest import sqlalchemy as sa from geopy import distance @@ -635,7 +635,7 @@ class TestSyncWithGoogleMaps: def directions(_self, *_args, **_kwargs): return api_response - monkeypatch.setattr(googlemaps.Client, "directions", directions) + monkeypatch.setattr(gm.Client, "directions", directions) def test_sync_instances_with_google_maps(self, path): """Call the method for a `Path` object without Google data."""