From a0c58f9b77eabcd67946a8c29b60b3389e210d60 Mon Sep 17 00:00:00 2001 From: ruttenb Date: Mon, 4 Mar 2024 11:10:05 -0500 Subject: [PATCH] run black --- history/conf.py | 4 +++- history/management/commands/triggers.py | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/history/conf.py b/history/conf.py index c5a8691..72357be 100644 --- a/history/conf.py +++ b/history/conf.py @@ -33,5 +33,7 @@ # A list of path prefixes the history middleware should ignore. MIDDLEWARE_IGNORE = getattr( - settings, "HISTORY_MIDDLEWARE_IGNORE", [settings.STATIC_URL.lstrip('/'), settings.MEDIA_URL.lstrip('/')] + settings, + "HISTORY_MIDDLEWARE_IGNORE", + [settings.STATIC_URL.lstrip("/"), settings.MEDIA_URL.lstrip("/")], ) diff --git a/history/management/commands/triggers.py b/history/management/commands/triggers.py index 8ebb53d..dcf1679 100644 --- a/history/management/commands/triggers.py +++ b/history/management/commands/triggers.py @@ -223,9 +223,9 @@ def create_history_table(cursor, base_table, pk_name, pk_type): "schema": conf.SCHEMA_NAME, "table": history_table, "role": conf.DB_ROLE, - "timestamp_type": "timestamp with time zone" - if conf.USE_TIMEZONES - else "timestamp", + "timestamp_type": ( + "timestamp with time zone" if conf.USE_TIMEZONES else "timestamp" + ), "pk_name": pk_name, "pk_type": pk_type, "user_field": conf.USER_FIELD, @@ -450,9 +450,9 @@ def create_trigger(cursor, trigger_type, table_name, pk_name, table_schema="publ "history_user_field": conf.USER_FIELD, "return": "OLD" if trigger_type == "delete" else "NEW", "role": conf.DB_ROLE, - "timestamp_type": "timestamp with time zone" - if conf.USE_TIMEZONES - else "timestamp", + "timestamp_type": ( + "timestamp with time zone" if conf.USE_TIMEZONES else "timestamp" + ), "user_type": conf.USER_TYPE, "default_user": maybe_quote(conf.DEFAULT_USER), "default_user_error": "true" if conf.DEFAULT_USER_ERROR else "false",