diff options
author | Daniel Schadt <kingdread@gmx.de> | 2024-11-28 21:35:25 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2024-11-28 21:35:25 +0100 |
commit | 7495437c02b2338c2884d4e92dfb91a62123d0cd (patch) | |
tree | cfb55a2b214672a4d4bb3e247245147ab07314cb | |
parent | 5d49a6350ca6c67f650280efe03d39d3760a30c2 (diff) | |
download | fietsboek-7495437c02b2338c2884d4e92dfb91a62123d0cd.tar.gz fietsboek-7495437c02b2338c2884d4e92dfb91a62123d0cd.tar.bz2 fietsboek-7495437c02b2338c2884d4e92dfb91a62123d0cd.zip |
fix lint
-rw-r--r-- | fietsboek/jinja2.py | 4 | ||||
-rw-r--r-- | fietsboek/views/profile.py | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/fietsboek/jinja2.py b/fietsboek/jinja2.py index 5106c38..7559f26 100644 --- a/fietsboek/jinja2.py +++ b/fietsboek/jinja2.py @@ -29,7 +29,7 @@ def filter_format_decimal(ctx: Context, value: float) -> str: @jinja2.pass_context -def filter_format_datetime(ctx: Context, value: datetime.datetime, format: str="medium") -> str: +def filter_format_datetime(ctx: Context, value: datetime.datetime, format: str = "medium") -> str: """Format a datetime according to the locale. :param ctx: The jinja context, passed automatically. @@ -45,7 +45,7 @@ def filter_format_datetime(ctx: Context, value: datetime.datetime, format: str=" @jinja2.pass_context -def filter_format_date(ctx: Context, value: datetime.date, format: str="medium") -> str: +def filter_format_date(ctx: Context, value: datetime.date, format: str = "medium") -> str: """Format a date according to the locale. :param ctx: The jinja context, passed automatically. diff --git a/fietsboek/views/profile.py b/fietsboek/views/profile.py index a002a81..38bdcdc 100644 --- a/fietsboek/views/profile.py +++ b/fietsboek/views/profile.py @@ -300,8 +300,7 @@ def calendar_rows( query = user.all_tracks_query() query = select(aliased(models.Track, query)).where(query.c.type == TrackType.ORGANIC) tracks = [ - TrackWithMetadata(track, data_manager) - for track in dbsession.execute(query).scalars() + TrackWithMetadata(track, data_manager) for track in dbsession.execute(query).scalars() ] # Step 2: Build the calendar @@ -320,9 +319,7 @@ def calendar_rows( ] # Step 3.5: Style the cells - days = [ - (day, cell_style(tracks), tracks) for (day, tracks) in days - ] + days = [(day, cell_style(tracks), tracks) for (day, tracks) in days] # Step 4: Layout rows = [] |