Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 5, 2024
1 parent 60b7b71 commit 0957ac7
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
1 change: 1 addition & 0 deletions config/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 7 additions & 3 deletions lwmdb/management/commands/createfixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
10 changes: 7 additions & 3 deletions lwmdb/management/commands/loadfixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
3 changes: 1 addition & 2 deletions lwmdb/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,8 +662,7 @@ def path_or_str_suffix(
return suffix


class DataSourceDownloadError(Exception):
...
class DataSourceDownloadError(Exception): ...


@dataclass
Expand Down
6 changes: 3 additions & 3 deletions mitchells/import_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
3 changes: 1 addition & 2 deletions newspapers/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 0957ac7

Please sign in to comment.