From b60b8c741650dab45818e899c03887b1b6b53539 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Tue, 8 Apr 2025 22:52:29 +0200 Subject: [PATCH] style: Format code for improved readability and consistency --- html_data_format/__main__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/html_data_format/__main__.py b/html_data_format/__main__.py index 5fbd995..75cf938 100644 --- a/html_data_format/__main__.py +++ b/html_data_format/__main__.py @@ -1,7 +1,6 @@ -import datetime -import json import logging from pathlib import Path + import bottle from personal_data import csv_import @@ -19,7 +18,7 @@ def newest_entry(csv_type: str): finds the newest entry based on the 'time.current' column, and returns it as JSON. """ - path = ROOT_DIRECTORY/f'{csv_type}.csv' + path = ROOT_DIRECTORY / f'{csv_type}.csv' bottle.response.content_type = 'application/json' @@ -41,7 +40,10 @@ def newest_entry(csv_type: str): else: newest = data[-1] - return {csv_import.csv_safe_value(k):csv_import.csv_safe_value(v) for k,v in newest.items()} + return { + csv_import.csv_safe_value(k): csv_import.csv_safe_value(v) + for k, v in newest.items() + } if __name__ == '__main__':