aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schadt <kingdread@gmx.de>2025-06-10 20:29:08 +0200
committerDaniel Schadt <kingdread@gmx.de>2025-06-10 20:29:08 +0200
commitc781fdfd19b5c975ebf52821ab12f0a569ba7a4e (patch)
treeba5c0e1be6032710da50b4f6a5742a84c9371d17
parent1843560ee69655de615912c4eac5ec8dce921830 (diff)
downloadfietsboek-c781fdfd19b5c975ebf52821ab12f0a569ba7a4e.tar.gz
fietsboek-c781fdfd19b5c975ebf52821ab12f0a569ba7a4e.tar.bz2
fietsboek-c781fdfd19b5c975ebf52821ab12f0a569ba7a4e.zip
fix lints
-rw-r--r--fietsboek/__init__.py2
-rw-r--r--fietsboek/models/track.py3
-rw-r--r--tests/bootstrap/test_new_instance.py1
-rw-r--r--tests/integration/test_browse.py5
4 files changed, 8 insertions, 3 deletions
diff --git a/fietsboek/__init__.py b/fietsboek/__init__.py
index af5fbb2..9cd58ed 100644
--- a/fietsboek/__init__.py
+++ b/fietsboek/__init__.py
@@ -130,7 +130,7 @@ def check_db_engine(sqlalchemy_uri: str):
case "sqlite":
pass
case _:
- LOGGER.warn(
+ LOGGER.warning(
"The configured SQL backend is not well tested in combination with fietsboek. "
"Use it at your own risk."
)
diff --git a/fietsboek/models/track.py b/fietsboek/models/track.py
index 4cbfdcd..5d80681 100644
--- a/fietsboek/models/track.py
+++ b/fietsboek/models/track.py
@@ -61,6 +61,9 @@ LOGGER = logging.getLogger(__name__)
class JsonText(sqlalchemy.types.TypeDecorator):
"""Saves objects serialized as JSON but keeps the column as a Text."""
+ # This is straight from the SQLAlchemy documentation, so the non-overriden
+ # methods should be fine.
+ # pylint: disable=too-many-ancestors,abstract-method
impl = sqlalchemy.types.Text
diff --git a/tests/bootstrap/test_new_instance.py b/tests/bootstrap/test_new_instance.py
index 7686fde..05076f4 100644
--- a/tests/bootstrap/test_new_instance.py
+++ b/tests/bootstrap/test_new_instance.py
@@ -117,4 +117,3 @@ def test_setup_via_fietsupdate(tmpdir):
# Clean up the database. This is important with anything but SQLite, as
# the tables would otherwise persist and interfere with the other tests.
cleanup_database(Path("testing.ini"))
-
diff --git a/tests/integration/test_browse.py b/tests/integration/test_browse.py
index 6913479..46ec329 100644
--- a/tests/integration/test_browse.py
+++ b/tests/integration/test_browse.py
@@ -85,7 +85,10 @@ def test_archive(testapp, dbsession, route_path, logged_in, tm, data_manager):
# pylint: disable=too-many-positional-arguments
with added_tracks(tm, dbsession, logged_in, data_manager) as tracks:
archive = testapp.get(
- route_path('track-archive', _query=[("track_id[]", tracks[0]), ("track_id[]", tracks[1])])
+ route_path(
+ 'track-archive',
+ _query=[("track_id[]", tracks[0]), ("track_id[]", tracks[1])],
+ )
)
result = io.BytesIO(archive.body)