diff --git a/pheme/parameter.py b/pheme/parameter.py index 3ee9fa9e..820161c3 100644 --- a/pheme/parameter.py +++ b/pheme/parameter.py @@ -101,7 +101,7 @@ def __process_form_data(request: HttpRequest, data: Dict) -> Dict: "Request data is expected to be a dict, " f"but it is {type(request.data)}" ) - for (key, value) in request.data.items(): + for key, value in request.data.items(): if isinstance(value, UploadedFile): file_type, _ = mimetypes.guess_type(value.name) logger.info( @@ -151,7 +151,6 @@ def __process_single_value(request: HttpRequest, data: Dict) -> Dict: ] ) def put(request: HttpRequest) -> Response: - if request.content_type == "application/json": return __put(request, __process_json_object) return __put(request, __process_form_data) diff --git a/pheme/templatetags/charts/h_bar.py b/pheme/templatetags/charts/h_bar.py index 776b7245..c640760f 100644 --- a/pheme/templatetags/charts/h_bar.py +++ b/pheme/templatetags/charts/h_bar.py @@ -98,7 +98,6 @@ def h_bar_chart( font_family="Dejavu Sans", font_size=10, ) -> SafeText: - """ Returns a stacked horizontal bar chart in svg. diff --git a/pheme/templatetags/charts/pie.py b/pheme/templatetags/charts/pie.py index 378fbe25..d7e4d713 100644 --- a/pheme/templatetags/charts/pie.py +++ b/pheme/templatetags/charts/pie.py @@ -99,7 +99,7 @@ def pie_chart( dash_array = circumference - border_size donut = "" - for (category, amount) in input_values.items(): + for category, amount in input_values.items(): percent = amount / total color = title_color.get(category) dash_offset = circumference - percent * circumference