From 9638970a5b284862113079a707caef64a554cd86 Mon Sep 17 00:00:00 2001 From: "Dragon (David McKee)" Date: Fri, 3 Sep 2021 11:15:48 +0100 Subject: [PATCH] Black spacing --- app/config/settings/base.py | 2 +- app/helpers/finders.py | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/config/settings/base.py b/app/config/settings/base.py index aa933053..06971258 100644 --- a/app/config/settings/base.py +++ b/app/config/settings/base.py @@ -279,7 +279,7 @@ WAGTAIL_SITE_NAME = "NHSX" WAGTAILEMBEDS_FINDERS = [ { - 'class': 'helpers.finders.OSMFinder', + "class": "helpers.finders.OSMFinder", # Any other options will be passed as kwargs to the __init__ method } ] diff --git a/app/helpers/finders.py b/app/helpers/finders.py index 6d8ed5e1..d9781571 100644 --- a/app/helpers/finders.py +++ b/app/helpers/finders.py @@ -3,6 +3,7 @@ class OSMFinder(EmbedFinder): """OpenStreetMap.org embed""" + def __init__(self, **options): pass @@ -12,10 +13,9 @@ def accept(self, url): This should not have any side effects (no requests to external servers) """ - if not url.startswith('https://www.openstreetmap.org/export/embed.html'): + if not url.startswith("https://www.openstreetmap.org/export/embed.html"): return False return True - def find_embed(self, url, max_width=None): """ @@ -27,11 +27,11 @@ def find_embed(self, url, max_width=None): return { # 'title': "", - 'author_name': "OpenStreetMap contributors", - 'provider_name': "OpenStreetMap.org", - 'type': "rich", + "author_name": "OpenStreetMap contributors", + "provider_name": "OpenStreetMap.org", + "type": "rich", # 'thumbnail_url': "URL to thumbnail image", - 'width': 425, - 'height': 350, - 'html': f"""

View Larger Map
""", + "width": 425, + "height": 350, + "html": f"""

View Larger Map
""", }