diff --git a/wsgi.py b/wsgi.py index 2e9834c..2305605 100644 --- a/wsgi.py +++ b/wsgi.py @@ -14,7 +14,12 @@ import pandas as pd from flask import Flask, Markup, abort, render_template, request from flask_caching import Cache -from download_digital import construct_dataframe, get_bez_data, get_landesbezirk, landesbezirk_dict +from download_digital import ( + construct_dataframe, + get_bez_data, + get_landesbezirk, + landesbezirk_dict, +) config = { "CACHE_TYPE": "FileSystemCache", @@ -278,7 +283,12 @@ def convert_fig_to_svg(fig: plt.Figure) -> str: return imgdata.read() -def _print_as_html(df: pd.DataFrame, output_str: list[str], total: int | None = None, dropna: bool = True) -> list[str]: +def _print_as_html( + df: pd.DataFrame, + output_str: list[str], + total: int | None = None, + dropna: bool = True, +) -> list[str]: df = df.astype({"Digitale Befragung": "Int32"}) if dropna: df = df.dropna() @@ -303,11 +313,13 @@ def _print_as_html(df: pd.DataFrame, output_str: list[str], total: int | None = " ", ] ) - if total and (diff := total - df['Digitale Befragung'].sum()): - tfoot.extend([ - "