diff options
-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 = [] |