Skip to content

Commit 32c79c9

Browse files
committed
lint
1 parent 6a5cf6b commit 32c79c9

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
extensions = ["sphinxext.opengraph"]
1+
from __future__ import annotations
22

3-
master_doc = "index"
4-
exclude_patterns = ["_build"]
3+
extensions = ['sphinxext.opengraph']
54

6-
html_theme = "basic"
5+
master_doc = 'index'
6+
exclude_patterns = ['_build']
77

8-
ogp_site_url = "http://example.org/en/latest/"
8+
html_theme = 'basic'
9+
10+
ogp_site_url = 'http://example.org/en/latest/'
911

1012
enable_meta_description = True

tests/test_options.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ def get_tag_content(tags, tag_type, kind='property', prefix='og'):
1919
return get_tag(tags, tag_type, kind, prefix).get('content', '')
2020

2121

22-
def get_tag_content_text(tags, tag_type, kind="property", prefix="og"):
22+
def get_tag_content_text(tags, tag_type, kind='property', prefix='og'):
2323
# Gets the content of a specific ogp tag
24-
return get_tag(tags, tag_type, kind, prefix).get_text("content", "")
24+
return get_tag(tags, tag_type, kind, prefix).get_text('content', '')
2525

2626

2727
def get_meta_description(tags):
@@ -50,10 +50,10 @@ def test_meta_name_description(meta_tags):
5050
assert description == og_description
5151

5252

53-
@pytest.mark.sphinx("html", testroot="meta-name-description-escape")
54-
def test_meta_name_description(meta_tags):
55-
og_description = get_tag_content(meta_tags, "description")
56-
og_description_text = get_tag_content_text(meta_tags, "description")
53+
@pytest.mark.sphinx('html', testroot='meta-name-description-escape')
54+
def test_meta_name_description_escape(meta_tags):
55+
og_description = get_tag_content(meta_tags, 'description')
56+
og_description_text = get_tag_content_text(meta_tags, 'description')
5757

5858
assert '<' in og_description
5959
assert '<' not in og_description_text

0 commit comments

Comments
 (0)