Skip to content

Commit a15c149

Browse files
Bump mypy to 1.16.1 (#13674)
Co-authored-by: Adam Dangoor <adamdangoor@gmail.com>
1 parent 3f63a14 commit a15c149

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ docs = [
9494
]
9595
lint = [
9696
"ruff==0.12.0",
97-
"mypy==1.15.0",
97+
"mypy==1.16.1",
9898
"sphinx-lint>=0.9",
9999
"types-colorama==0.4.15.20240311",
100100
"types-defusedxml==0.7.0.20250516",
@@ -158,7 +158,7 @@ translations = [
158158
"Jinja2>=3.1",
159159
]
160160
types = [
161-
"mypy==1.15.0",
161+
"mypy==1.16.1",
162162
"pyrefly",
163163
"pyright==1.1.400",
164164
{ include-group = "type-stubs" },

sphinx/cmd/quickstart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,7 @@ def main(argv: Sequence[str] = (), /) -> int:
801801
print('[Interrupted.]')
802802
return 130 # 128 + SIGINT
803803

804-
for variable in d.get('variables', []):
804+
for variable in d.get('variables', []): # type: ignore[union-attr]
805805
try:
806806
name, value = variable.split('=')
807807
d[name] = value

sphinx/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ def _validate_valid_types(
635635
if isinstance(valid_types, type):
636636
return frozenset((valid_types,))
637637
if valid_types is Any:
638-
return frozenset({Any}) # type: ignore[arg-type]
638+
return frozenset({Any})
639639
if isinstance(valid_types, set):
640640
return frozenset(valid_types)
641641
try:

sphinx/domains/javascript.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def handle_signature(self, sig: str, signode: desc_signature) -> tuple[str, str]
141141
trailing_comma=trailing_comma,
142142
env=self.env,
143143
)
144-
return fullname, prefix
144+
return fullname, prefix # type: ignore[return-value]
145145

146146
def _object_hierarchy_parts(self, sig_node: desc_signature) -> tuple[str, ...]:
147147
if 'fullname' not in sig_node:

sphinx/domains/python/_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ def add_target_and_index(
431431
)
432432

433433
if 'no-index-entry' not in self.options:
434-
if index_text := self.get_index_text(mod_name, name_cls):
434+
if index_text := self.get_index_text(mod_name, name_cls): # type: ignore[arg-type]
435435
self.indexnode['entries'].append((
436436
'single',
437437
index_text,

sphinx/util/math.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def get_node_equation_number(writer: HTML5Translator, node: nodes.math_block) ->
1414
if writer.builder.config.math_numfig and writer.builder.config.numfig:
1515
figtype = 'displaymath'
1616
if writer.builder.name == 'singlehtml':
17-
key = f'{writer.docnames[-1]}/{figtype}' # type: ignore[has-type]
17+
key = f'{writer.docnames[-1]}/{figtype}'
1818
else:
1919
key = figtype
2020

0 commit comments

Comments
 (0)