Skip to content

Commit af70fc7

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent c1c30d2 commit af70fc7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

sphinx_design/cards.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def create_card( # noqa: PLR0915
8585
# TODO better degradation for latex
8686
card_classes = ["sd-card", "sd-sphinx-override"]
8787
if "width" in options:
88-
card_classes += [f'sd-w-{options["width"].rstrip("%")}']
88+
card_classes += [f"sd-w-{options['width'].rstrip('%')}"]
8989
card_classes += options.get("margin", ["sd-mb-3"])
9090
card_classes += [f"sd-shadow-{options.get('shadow', 'sm')}"]
9191
if "link" in options:

sphinx_design/grids.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def run_with_defaults(self) -> list[nodes.Node]:
191191
+ self.options.get("margin", [])
192192
+ self.options.get("padding", [])
193193
+ (
194-
[f'sd-align-major-{self.options["child-align"]}']
194+
[f"sd-align-major-{self.options['child-align']}"]
195195
if "child-align" in self.options
196196
else []
197197
)

tests/test_snippets.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def test_snippets_rst(
4545
doctree.attributes.pop("translation_progress", None) # added in sphinx 7.1
4646
file_regression.check(
4747
doctree.pformat(),
48-
basename=f"snippet_pre_{path.name[:-len(path.suffix)]}",
48+
basename=f"snippet_pre_{path.name[: -len(path.suffix)]}",
4949
extension=".xml",
5050
encoding="utf8",
5151
)
@@ -70,7 +70,7 @@ def test_snippets_myst(
7070
doctree.attributes.pop("translation_progress", None) # added in sphinx 7.1
7171
file_regression.check(
7272
doctree.pformat(),
73-
basename=f"snippet_pre_{path.name[:-len(path.suffix)]}",
73+
basename=f"snippet_pre_{path.name[: -len(path.suffix)]}",
7474
extension=".xml",
7575
encoding="utf8",
7676
)
@@ -94,7 +94,7 @@ def test_snippets_rst_post(
9494
doctree.attributes.pop("translation_progress", None) # added in sphinx 7.1
9595
file_regression.check(
9696
doctree.pformat(),
97-
basename=f"snippet_post_{path.name[:-len(path.suffix)]}",
97+
basename=f"snippet_post_{path.name[: -len(path.suffix)]}",
9898
extension=".xml",
9999
encoding="utf8",
100100
)
@@ -119,7 +119,7 @@ def test_snippets_myst_post(
119119
doctree.attributes.pop("translation_progress", None) # added in sphinx 7.1
120120
file_regression.check(
121121
doctree.pformat(),
122-
basename=f"snippet_post_{path.name[:-len(path.suffix)]}",
122+
basename=f"snippet_post_{path.name[: -len(path.suffix)]}",
123123
extension=".xml",
124124
encoding="utf8",
125125
)

0 commit comments

Comments
 (0)