diff --git a/config/urls.py b/config/urls.py index 837996dd..ddaa16b8 100644 --- a/config/urls.py +++ b/config/urls.py @@ -14,6 +14,7 @@ 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ + from django.conf import settings from django.conf.urls.static import static from django.contrib import admin diff --git a/lwmdb/management/commands/createfixtures.py b/lwmdb/management/commands/createfixtures.py index 3b95e269..e1e67dc5 100644 --- a/lwmdb/management/commands/createfixtures.py +++ b/lwmdb/management/commands/createfixtures.py @@ -51,9 +51,13 @@ def handle(self, *args, **kwargs): ) # Block if non-allowed apps passed - exit( - f"App(s) not allowed: {[x for x in apps if not x in ALLOWED_APPS]}", - ) if [x for x in apps if not x in ALLOWED_APPS] else None + ( + exit( + f"App(s) not allowed: {[x for x in apps if not x in ALLOWED_APPS]}", + ) + if [x for x in apps if not x in ALLOWED_APPS] + else None + ) for app in apps: if app == "gazetteer": diff --git a/lwmdb/management/commands/loadfixtures.py b/lwmdb/management/commands/loadfixtures.py index f808ab7c..1b201bf3 100644 --- a/lwmdb/management/commands/loadfixtures.py +++ b/lwmdb/management/commands/loadfixtures.py @@ -32,9 +32,13 @@ def handle(self, *args, **kwargs): ) # Block if non-allowed apps passed - exit( - f"App(s) not allowed: {[x for x in apps if not x in ALLOWED_APPS]}", - ) if [x for x in apps if not x in ALLOWED_APPS] else None + ( + exit( + f"App(s) not allowed: {[x for x in apps if not x in ALLOWED_APPS]}", + ) + if [x for x in apps if not x in ALLOWED_APPS] + else None + ) for app in apps: if app == "newspapers": diff --git a/lwmdb/utils.py b/lwmdb/utils.py index 2ef38622..cd9f825b 100644 --- a/lwmdb/utils.py +++ b/lwmdb/utils.py @@ -662,8 +662,7 @@ def path_or_str_suffix( return suffix -class DataSourceDownloadError(Exception): - ... +class DataSourceDownloadError(Exception): ... @dataclass diff --git a/mitchells/import_fixtures.py b/mitchells/import_fixtures.py index c516c5e3..96ddff90 100644 --- a/mitchells/import_fixtures.py +++ b/mitchells/import_fixtures.py @@ -217,9 +217,9 @@ def create_mitchells_fixtures(self): # Create mitchells_publication_for_linking (for newspapers) mitchells_publication_for_linking = mitchells_entries.copy() mitchells_publication_for_linking = mitchells_publication_for_linking[["NLP"]] - mitchells_publication_for_linking[ - "entry" - ] = mitchells_publication_for_linking.index + mitchells_publication_for_linking["entry"] = ( + mitchells_publication_for_linking.index + ) mitchells_publication_for_linking.to_csv( AUTO_FILE_LOCATIONS["mitchells_publication_for_linking"] diff --git a/newspapers/models.py b/newspapers/models.py index c47cf09c..7aa71b86 100644 --- a/newspapers/models.py +++ b/newspapers/models.py @@ -278,8 +278,7 @@ def _sync_title_counts(self, force: bool = False) -> None: SAS_ENV_VARIABLE = "FULLTEXT_SAS_TOKEN" - class TitleLengthError(Exception): - ... + class TitleLengthError(Exception): ... @property def download_dir(self):