From 1114e72c011e77524f332eddcc9621fefd4ddbdf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 09:38:55 +0100 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#1367) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.0 → v0.8.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.0...v0.8.6) - [github.com/pre-commit/mirrors-mypy: v1.13.0 → v1.14.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.13.0...v1.14.1) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Chris Sewell --- .pre-commit-config.yaml | 4 ++-- sphinx_needs/directives/needflow/_graphviz.py | 2 +- sphinx_needs/directives/needgantt.py | 2 +- sphinx_needs/services/github.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 92ce68881..0655be6c8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -6,14 +6,14 @@ repos: - id: taplo-format - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.0 + rev: v0.8.6 hooks: - id: ruff args: [--fix] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.13.0 + rev: v1.14.1 hooks: - id: mypy files: sphinx_needs/.* diff --git a/sphinx_needs/directives/needflow/_graphviz.py b/sphinx_needs/directives/needflow/_graphviz.py index 42e04d1a7..83b658e2b 100644 --- a/sphinx_needs/directives/needflow/_graphviz.py +++ b/sphinx_needs/directives/needflow/_graphviz.py @@ -146,7 +146,7 @@ def process_needflow_graphviz( for etype in ("graph", "node", "edge"): if etype in attributes["graphviz_style"]: content += f"{etype} [\n" - for key, value in attributes["graphviz_style"][etype].items(): # type: ignore[literal-required] + for key, value in attributes["graphviz_style"][etype].items(): content += f" {key}={_quote(str(value))};\n" content += "]\n" diff --git a/sphinx_needs/directives/needgantt.py b/sphinx_needs/directives/needgantt.py index 3b7ea2b5f..16947dd0c 100644 --- a/sphinx_needs/directives/needgantt.py +++ b/sphinx_needs/directives/needgantt.py @@ -317,7 +317,7 @@ def process_needgantt( else: start_end_sync = "start" - for link_type in current_needgantt[con_type]: # type: ignore[literal-required] + for link_type in current_needgantt[con_type]: start_with_links = need[link_type] # type: ignore[literal-required] for start_with_link in start_with_links: start_need = all_needs_dict[start_with_link] diff --git a/sphinx_needs/services/github.py b/sphinx_needs/services/github.py index 1789d4cc4..d31d82ba0 100644 --- a/sphinx_needs/services/github.py +++ b/sphinx_needs/services/github.py @@ -243,7 +243,7 @@ def prepare_issue_data( line, 60, break_long_words=True, replace_whitespace=False ) ) - for line in item["body"].splitlines() # type: ignore + for line in item["body"].splitlines() if line.strip() ]