From 48b4347ccad9b284967eee7017db4585c04e84cf Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Wed, 27 Jul 2022 16:30:27 +0200 Subject: fix lints --- fietsboek/views/browse.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fietsboek/views/browse.py b/fietsboek/views/browse.py index 83a58b3..678e207 100644 --- a/fietsboek/views/browse.py +++ b/fietsboek/views/browse.py @@ -36,18 +36,20 @@ class Stream(RawIOBase): def _get_int(request, name): try: return int(request.params.get(name)) - except ValueError: - raise HTTPBadRequest(f'Invalid integer in {name!r}') + except ValueError as exc: + raise HTTPBadRequest(f'Invalid integer in {name!r}') from exc + def _get_date(request, name): try: return datetime.date.fromisoformat(request.params.get(name)) - except ValueError: - raise HTTPBadRequest(f'Invalid date in {name!r}') + except ValueError as exc: + raise HTTPBadRequest(f'Invalid date in {name!r}') from exc class TrackFilters: """A filter that applies user-given filters to a track.""" + # pylint: disable=fixme # TODO: We should also do some of those in SQL, if possible. def __init__(self, filters): -- cgit v1.2.3