Skip to content

Commit

Permalink
Bump to Ruff 0.9.3
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Jan 25, 2025
1 parent a1c77f1 commit 0bc8b41
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ docs = [
"sphinxcontrib-websupport",
]
lint = [
"ruff==0.9.2",
"ruff==0.9.3",
"mypy==1.14.1",
"sphinx-lint>=0.9",
"types-colorama==0.4.15.20240311",
Expand Down
2 changes: 0 additions & 2 deletions sphinx/builders/latex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,6 @@ def assemble_doctree(
nodes.Text(')'),
))
break
else:
pass
pendingnode.replace_self(newnodes)
return largetree

Expand Down
2 changes: 0 additions & 2 deletions sphinx/builders/texinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ def assemble_doctree(
nodes.Text(')'),
))
break
else:
pass
pendingnode.replace_self(newnodes)
return largetree

Expand Down
13 changes: 6 additions & 7 deletions sphinx/ext/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def write_c_coverage(self) -> None:
for filename, undoc in self.c_undoc.items():
write_header(op, filename)
for typ, name in sorted(undoc):
op.write(' * %-50s [%9s]\n' % (name, typ))
op.write(f' * {name:<50} [{typ:>9}]\n')
if self.config.coverage_show_missing_items:
if self.app.quiet:
logger.warning(
Expand Down Expand Up @@ -415,8 +415,7 @@ def _write_py_statistics(self, op: TextIO) -> None:
else:
table.append(['TOTAL', '100', '0'])

for line in _write_table(table):
op.write(f'{line}\n')
op.writelines(f'{line}\n' for line in _write_table(table))

def write_py_coverage(self) -> None:
output_file = self.outdir / 'python.txt'
Expand Down Expand Up @@ -445,7 +444,7 @@ def write_py_coverage(self) -> None:
write_header(op, name)
if undoc['funcs']:
op.write('Functions:\n')
op.writelines(' * %s\n' % x for x in undoc['funcs'])
op.writelines(f' * {x}\n' for x in undoc['funcs'])
if self.config.coverage_show_missing_items:
if self.app.quiet:
for func in undoc['funcs']:
Expand All @@ -467,7 +466,7 @@ def write_py_coverage(self) -> None:
op.write('Classes:\n')
for class_name, methods in sorted(undoc['classes'].items()):
if not methods:
op.write(' * %s\n' % class_name)
op.write(f' * {class_name}\n')
if self.config.coverage_show_missing_items:
if self.app.quiet:
logger.warning(
Expand All @@ -483,8 +482,8 @@ def write_py_coverage(self) -> None:
+ name
)
else:
op.write(' * %s -- missing methods:\n\n' % class_name)
op.writelines(' - %s\n' % x for x in methods)
op.write(f' * {class_name} -- missing methods:\n\n')
op.writelines(f' - {x}\n' for x in methods)
if self.config.coverage_show_missing_items:
if self.app.quiet:
for meth in methods:
Expand Down
2 changes: 1 addition & 1 deletion sphinx/util/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
pathlib.WindowsPath: 'pathlib.WindowsPath',
# types in 'pickle' with <type>.__module__ == 'pickle':
pickle.Pickler: 'pickle.Pickler',
pickle.Unpickler: 'pickle.Unpickler',
pickle.Unpickler: 'pickle.Unpickler', # NoQA: S301
# types in 'struct' with <type>.__module__ == '_struct':
struct.Struct: 'struct.Struct',
# types in 'types' with <type>.__module__ == 'builtins':
Expand Down

0 comments on commit 0bc8b41

Please sign in to comment.