Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #214

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,22 @@ exclude: >
repos:

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-json
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
rev: v0.11.4
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.1
rev: v1.15.0
hooks:
- id: mypy
additional_dependencies: []
Expand Down
2 changes: 1 addition & 1 deletion sphinx_design/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def create_card( # noqa: PLR0915
# TODO better degradation for latex
card_classes = ["sd-card", "sd-sphinx-override"]
if "width" in options:
card_classes += [f'sd-w-{options["width"].rstrip("%")}']
card_classes += [f"sd-w-{options['width'].rstrip('%')}"]
card_classes += options.get("margin", ["sd-mb-3"])
card_classes += [f"sd-shadow-{options.get('shadow', 'sm')}"]
if "link" in options:
Expand Down
2 changes: 1 addition & 1 deletion sphinx_design/grids.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def run_with_defaults(self) -> list[nodes.Node]:
+ self.options.get("margin", [])
+ self.options.get("padding", [])
+ (
[f'sd-align-major-{self.options["child-align"]}']
[f"sd-align-major-{self.options['child-align']}"]
if "child-align" in self.options
else []
)
Expand Down
8 changes: 4 additions & 4 deletions tests/test_snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def test_snippets_rst(
doctree.attributes.pop("translation_progress", None) # added in sphinx 7.1
file_regression.check(
doctree.pformat(),
basename=f"snippet_pre_{path.name[:-len(path.suffix)]}",
basename=f"snippet_pre_{path.name[: -len(path.suffix)]}",
extension=".xml",
encoding="utf8",
)
Expand All @@ -70,7 +70,7 @@ def test_snippets_myst(
doctree.attributes.pop("translation_progress", None) # added in sphinx 7.1
file_regression.check(
doctree.pformat(),
basename=f"snippet_pre_{path.name[:-len(path.suffix)]}",
basename=f"snippet_pre_{path.name[: -len(path.suffix)]}",
extension=".xml",
encoding="utf8",
)
Expand All @@ -94,7 +94,7 @@ def test_snippets_rst_post(
doctree.attributes.pop("translation_progress", None) # added in sphinx 7.1
file_regression.check(
doctree.pformat(),
basename=f"snippet_post_{path.name[:-len(path.suffix)]}",
basename=f"snippet_post_{path.name[: -len(path.suffix)]}",
extension=".xml",
encoding="utf8",
)
Expand All @@ -119,7 +119,7 @@ def test_snippets_myst_post(
doctree.attributes.pop("translation_progress", None) # added in sphinx 7.1
file_regression.check(
doctree.pformat(),
basename=f"snippet_post_{path.name[:-len(path.suffix)]}",
basename=f"snippet_post_{path.name[: -len(path.suffix)]}",
extension=".xml",
encoding="utf8",
)
Expand Down