diff options
-rw-r--r-- | fietsboek/actions.py | 2 | ||||
-rw-r--r-- | fietsboek/pages.py | 2 | ||||
-rw-r--r-- | fietsboek/scripts/fietsctl.py | 2 | ||||
-rw-r--r-- | fietsboek/views/tileproxy.py | 20 | ||||
-rw-r--r-- | tests/integration/test_browse.py | 2 |
5 files changed, 15 insertions, 13 deletions
diff --git a/fietsboek/actions.py b/fietsboek/actions.py index 4caf985..33b96b3 100644 --- a/fietsboek/actions.py +++ b/fietsboek/actions.py @@ -67,7 +67,7 @@ def add_track( :return: The track object that has been inserted into the database. Useful for its ``id`` attribute. """ - # pylint: disable=too-many-arguments,too-many-locals + # pylint: disable=too-many-positional-arguments,too-many-locals,too-many-arguments LOGGER.debug("Inserting new track...") track = models.Track( owner=owner, diff --git a/fietsboek/pages.py b/fietsboek/pages.py index 52cafd4..cb546b2 100644 --- a/fietsboek/pages.py +++ b/fietsboek/pages.py @@ -55,7 +55,7 @@ class Page: user_filter: UserFilter = UserFilter.EVERYONE, menu_index: int = 0, ): - # pylint: disable=too-many-arguments + # pylint: disable=too-many-positional-arguments,too-many-arguments self.slug = slug self.title = title self.content = content diff --git a/fietsboek/scripts/fietsctl.py b/fietsboek/scripts/fietsctl.py index e2a005d..ad06e91 100644 --- a/fietsboek/scripts/fietsctl.py +++ b/fietsboek/scripts/fietsctl.py @@ -1,6 +1,6 @@ """Script to do maintenance work on a Fietsboek instance.""" -# pylint: disable=too-many-arguments +# pylint: disable=too-many-positional-arguments,too-many-arguments import logging from typing import Optional diff --git a/fietsboek/views/tileproxy.py b/fietsboek/views/tileproxy.py index 8664bee..e129ae1 100644 --- a/fietsboek/views/tileproxy.py +++ b/fietsboek/views/tileproxy.py @@ -33,7 +33,7 @@ def _href(url, text): return f'<a href="{url}" target="_blank">{text}</a>' -_jb_copy = _href("https://www.j-berkemeier.de/GPXViewer", "GPXViewer") +_JB_COPY = _href("https://www.j-berkemeier.de/GPXViewer", "GPXViewer") def _url(value: str) -> AnyUrl: @@ -51,7 +51,7 @@ DEFAULT_TILE_LAYERS = [ access=LayerAccess.PUBLIC, attribution="".join( [ - _jb_copy, + _JB_COPY, " | Map data © ", _href("https://www.openstreetmap.org/", "OpenStreetMap"), " and contributors ", @@ -71,7 +71,7 @@ DEFAULT_TILE_LAYERS = [ access=LayerAccess.PUBLIC, attribution="".join( [ - _jb_copy, + _JB_COPY, " | Map data © ", _href("https://www.esri.com", "Esri"), ", i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, ", @@ -88,7 +88,7 @@ DEFAULT_TILE_LAYERS = [ access=LayerAccess.PUBLIC, attribution="".join( [ - _jb_copy, + _JB_COPY, " | Map data © ", _href("https://www.openstreetmap.org/", "OpenStreetMap"), " and contributors ", @@ -105,7 +105,7 @@ DEFAULT_TILE_LAYERS = [ access=LayerAccess.PUBLIC, attribution="".join( [ - _jb_copy, + _JB_COPY, " | Kartendaten: © OpenStreetMap-Mitwirkende, SRTM | Kartendarstellung: © ", _href("https://opentopomap.org/about", "OpenTopoMap"), " (CC-BY-SA)", @@ -124,7 +124,7 @@ DEFAULT_TILE_LAYERS = [ access=LayerAccess.PUBLIC, attribution="".join( [ - _jb_copy, + _JB_COPY, " | Kartendaten: © ", _href( "https://www.bkg.bund.de/SharedDocs/Produktinformationen" @@ -181,7 +181,7 @@ STAMEN_LAYERS = [ zoom=17, access=LayerAccess.PUBLIC, attribution=( - f'{_jb_copy} | Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' + f'{_JB_COPY} | Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' 'under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. ' 'Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under ' '<a href="http://www.openstreetmap.org/copyright">ODbL</a>.' @@ -195,7 +195,7 @@ STAMEN_LAYERS = [ zoom=15, access=LayerAccess.PUBLIC, attribution=( - f'{_jb_copy} | Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' + f'{_JB_COPY} | Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' 'under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. ' 'Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under ' '<a href="http://www.openstreetmap.org/copyright">ODbL</a>.' @@ -209,7 +209,7 @@ STAMEN_LAYERS = [ zoom=17, access=LayerAccess.PUBLIC, attribution=( - f'{_jb_copy} | Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' + f'{_JB_COPY} | Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' 'under <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>. ' 'Data by <a href="http://openstreetmap.org">OpenStreetMap</a>, under ' '<a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>.' @@ -409,7 +409,7 @@ def _extract_thunderforest(config): tf_access = config.thunderforest_access tf_attribution = " | ".join( [ - _jb_copy, + _JB_COPY, _href("https://www.thunderforest.com/", "Thunderforest"), _href("https://www.openstreetmap.org/", "OpenStreetMap"), ] diff --git a/tests/integration/test_browse.py b/tests/integration/test_browse.py index 89d6f94..875821d 100644 --- a/tests/integration/test_browse.py +++ b/tests/integration/test_browse.py @@ -68,6 +68,7 @@ def added_tracks(tm, dbsession, owner, data_manager): def test_browse(testapp, dbsession, route_path, logged_in, tm, data_manager): + # pylint: disable=too-many-positional-arguments # Ensure there are some tracks in the database with added_tracks(tm, dbsession, logged_in, data_manager): # Now go to the browse page @@ -78,6 +79,7 @@ def test_browse(testapp, dbsession, route_path, logged_in, tm, data_manager): 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): archive = testapp.get( route_path('track-archive', _query=[("track_id[]", "1"), ("track_id[]", "2")]) |