Skip to content

Commit 96aadcf

Browse files
committed
Blackify everything
1 parent fa5e49b commit 96aadcf

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

docs/script/generate_social_card_previews.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77

88
from pathlib import Path
99
from textwrap import dedent
10-
from sphinxext.opengraph.socialcards import render_social_card, MAX_CHAR_PAGE_TITLE, MAX_CHAR_DESCRIPTION
10+
from sphinxext.opengraph.socialcards import (
11+
render_social_card,
12+
MAX_CHAR_PAGE_TITLE,
13+
MAX_CHAR_DESCRIPTION,
14+
)
1115
import random
1216

1317
here = Path(__file__).parent
@@ -46,7 +50,7 @@
4650
description=desc,
4751
siteurl="sphinxext-opengraph.readthedocs.io",
4852
plt_objects=plt_objects,
49-
kwargs_fig=kwargs_fig
53+
kwargs_fig=kwargs_fig,
5054
)
5155

5256
path_examples_page_folder = here / ".."

noxfile.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ def docs(session):
2626
session.install("sphinx-autobuild")
2727
session.run(*split("sphinx-autobuild -b html docs/source docs/build/html"))
2828
else:
29-
session.run(*split("sphinx-build -nW --keep-going -b html docs/source docs/build/html"))
29+
session.run(
30+
*split("sphinx-build -nW --keep-going -b html docs/source docs/build/html")
31+
)
3032

3133

3234
@nox.session

tests/test_options.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,16 @@ def test_image_social_cards(og_meta_tags):
9797
"""Social cards should automatically be added if no og:image is given."""
9898
# Asserting `in` instead of `==` because of the hash that is generated
9999
assert (
100-
"http://example.org/en/latest/_images/social_previews/summary_index" in
101-
get_tag_content(og_meta_tags, "image")
100+
"http://example.org/en/latest/_images/social_previews/summary_index"
101+
in get_tag_content(og_meta_tags, "image")
102102
)
103103
# Image alt text should be taken from page content.
104104
assert (
105-
"Lorem ipsum dolor sit amet, consectetur adipiscing elit." in
106-
get_tag_content(og_meta_tags, "image:alt")
105+
"Lorem ipsum dolor sit amet, consectetur adipiscing elit."
106+
in get_tag_content(og_meta_tags, "image:alt")
107107
)
108108

109+
109110
@pytest.mark.sphinx("html", testroot="type")
110111
def test_type(og_meta_tags):
111112
assert get_tag_content(og_meta_tags, "type") == "article"

0 commit comments

Comments
 (0)