From f082cd4d2d7bf343fbacb0d69ff080a8be7fe16f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 04:04:03 +0000 Subject: [PATCH 1/2] Bump mypy from 1.15.0 to 1.16.1 Bumps [mypy](https://github.com/python/mypy) from 1.15.0 to 1.16.1. - [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md) - [Commits](https://github.com/python/mypy/compare/v1.15.0...v1.16.1) --- updated-dependencies: - dependency-name: mypy dependency-version: 1.16.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c492e346309..aeb77e3547f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,7 +94,7 @@ docs = [ ] lint = [ "ruff==0.12.0", - "mypy==1.15.0", + "mypy==1.16.1", "sphinx-lint>=0.9", "types-colorama==0.4.15.20240311", "types-defusedxml==0.7.0.20250516", @@ -158,7 +158,7 @@ translations = [ "Jinja2>=3.1", ] types = [ - "mypy==1.15.0", + "mypy==1.16.1", "pyrefly", "pyright==1.1.400", { include-group = "type-stubs" }, From 78f0b99123a9e1f588b9b4d68605582f37c296de Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Tue, 24 Jun 2025 06:49:04 +0100 Subject: [PATCH 2/2] Add and remove type ignores to account for mypy changes --- sphinx/cmd/quickstart.py | 2 +- sphinx/config.py | 2 +- sphinx/domains/javascript.py | 2 +- sphinx/domains/python/_object.py | 2 +- sphinx/util/math.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sphinx/cmd/quickstart.py b/sphinx/cmd/quickstart.py index 0275343e847..73cdabfd97b 100644 --- a/sphinx/cmd/quickstart.py +++ b/sphinx/cmd/quickstart.py @@ -801,7 +801,7 @@ def main(argv: Sequence[str] = (), /) -> int: print('[Interrupted.]') return 130 # 128 + SIGINT - for variable in d.get('variables', []): + for variable in d.get('variables', []): # type: ignore[union-attr] try: name, value = variable.split('=') d[name] = value diff --git a/sphinx/config.py b/sphinx/config.py index e878cd7a834..ba6ec2bd619 100644 --- a/sphinx/config.py +++ b/sphinx/config.py @@ -635,7 +635,7 @@ def _validate_valid_types( if isinstance(valid_types, type): return frozenset((valid_types,)) if valid_types is Any: - return frozenset({Any}) # type: ignore[arg-type] + return frozenset({Any}) if isinstance(valid_types, set): return frozenset(valid_types) try: diff --git a/sphinx/domains/javascript.py b/sphinx/domains/javascript.py index e620e04b401..6ebd1dec3fd 100644 --- a/sphinx/domains/javascript.py +++ b/sphinx/domains/javascript.py @@ -141,7 +141,7 @@ def handle_signature(self, sig: str, signode: desc_signature) -> tuple[str, str] trailing_comma=trailing_comma, env=self.env, ) - return fullname, prefix + return fullname, prefix # type: ignore[return-value] def _object_hierarchy_parts(self, sig_node: desc_signature) -> tuple[str, ...]: if 'fullname' not in sig_node: diff --git a/sphinx/domains/python/_object.py b/sphinx/domains/python/_object.py index 6cd19245aae..5dcb3143ce5 100644 --- a/sphinx/domains/python/_object.py +++ b/sphinx/domains/python/_object.py @@ -431,7 +431,7 @@ def add_target_and_index( ) if 'no-index-entry' not in self.options: - if index_text := self.get_index_text(mod_name, name_cls): + if index_text := self.get_index_text(mod_name, name_cls): # type: ignore[arg-type] self.indexnode['entries'].append(( 'single', index_text, diff --git a/sphinx/util/math.py b/sphinx/util/math.py index f482e0c4dac..898aab2d617 100644 --- a/sphinx/util/math.py +++ b/sphinx/util/math.py @@ -14,7 +14,7 @@ def get_node_equation_number(writer: HTML5Translator, node: nodes.math_block) -> if writer.builder.config.math_numfig and writer.builder.config.numfig: figtype = 'displaymath' if writer.builder.name == 'singlehtml': - key = f'{writer.docnames[-1]}/{figtype}' # type: ignore[has-type] + key = f'{writer.docnames[-1]}/{figtype}' else: key = figtype