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() ]