Skip to content

Bump mypy from 1.15.0 to 1.16.1 #13674

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

Merged
merged 3 commits into from
Jun 24, 2025
Merged
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
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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" },
2 changes: 1 addition & 1 deletion sphinx/cmd/quickstart.py
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion sphinx/config.py
Original file line number Diff line number Diff line change
@@ -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:
2 changes: 1 addition & 1 deletion sphinx/domains/javascript.py
Original file line number Diff line number Diff line change
@@ -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:
2 changes: 1 addition & 1 deletion sphinx/domains/python/_object.py
Original file line number Diff line number Diff line change
@@ -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,
2 changes: 1 addition & 1 deletion sphinx/util/math.py
Original file line number Diff line number Diff line change
@@ -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