Skip to content

Commit

Permalink
Change: Reformat code with new version of black
Browse files Browse the repository at this point in the history
  • Loading branch information
timopollmeier committed Jun 27, 2023
1 parent 73984d9 commit caea147
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pheme/parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
1 change: 0 additions & 1 deletion pheme/templatetags/charts/h_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def h_bar_chart(
font_family="Dejavu Sans",
font_size=10,
) -> SafeText:

"""
Returns a stacked horizontal bar chart in svg.
Expand Down
2 changes: 1 addition & 1 deletion pheme/templatetags/charts/pie.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit caea147

Please sign in to comment.