Skip to content

Commit

Permalink
Updated black, mypy and ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzbrand committed Jan 29, 2024
1 parent 7f16a8c commit 65befa2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions home/import_content_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def __init__(
self.locale = locale
self.locale_map: dict[str, Locale] = {}
self.shadow_pages: dict[PageId, ShadowContentPage] = {}
self.go_to_page_buttons: dict[
PageId, dict[int, list[dict[str, Any]]]
] = defaultdict(lambda: defaultdict(list))
self.go_to_page_buttons: dict[PageId, dict[int, list[dict[str, Any]]]] = (
defaultdict(lambda: defaultdict(list))
)

def locale_from_display_name(self, langname: str) -> Locale:
if langname not in self.locale_map:
Expand Down
8 changes: 5 additions & 3 deletions home/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,11 @@ def profile_field(self, obj):
def page(self, obj):
if obj.pages:
return [
p.value["contentpage"].slug
if p.value and "contentpage" in p.value
else ""
(
p.value["contentpage"].slug
if p.value and "contentpage" in p.value
else ""
)
for p in obj.pages
]
return ["-"]
Expand Down

0 comments on commit 65befa2

Please sign in to comment.