From 40b53acd4576472111eb6e8de572998df02781ae Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Wed, 28 Aug 2024 13:04:14 +0300 Subject: [PATCH] Address `ruff` lint issues --- tests/database_test.py | 2 +- tests/models_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/database_test.py b/tests/database_test.py index c045828..dfbb449 100644 --- a/tests/database_test.py +++ b/tests/database_test.py @@ -240,5 +240,5 @@ def test_modes(self, mock_open) -> None: with geoip2.database.Reader( path, mode=geoip2.database.MODE_MMAP_EXT, - ) as reader: + ): mock_open.assert_called_once_with(path, geoip2.database.MODE_MMAP_EXT) diff --git a/tests/models_test.py b/tests/models_test.py index c22237a..3cd805b 100644 --- a/tests/models_test.py +++ b/tests/models_test.py @@ -269,7 +269,7 @@ def test_city_full(self) -> None: assert re.search( r"^geoip2.models.City\(\{.*geoname_id.*\}, \[.*en.*\]\)", str(model) ), "City str representation looks reasonable" - assert not (model == True), "__eq__ does not blow up on weird input" + assert not (model == 8), "__eq__ does not blow up on weird input" def test_unknown_keys(self) -> None: model = geoip2.models.City(