Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions sphinx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
['git', 'rev-parse', '--short', 'HEAD'],
cwd=package_dir,
capture_output=True,
check=False,
encoding='ascii',
errors='surrogateescape',
).stdout:
Expand Down
3 changes: 2 additions & 1 deletion sphinx/testing/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,8 @@ def if_graphviz_found(app: SphinxTestApp) -> None: # NoQA: PT004
graphviz_dot = getattr(app.config, 'graphviz_dot', '')
try:
if graphviz_dot:
subprocess.run([graphviz_dot, '-V'], capture_output=True) # show version
# print the graphviz_dot version, to check that the binary is available
subprocess.run([graphviz_dot, '-V'], capture_output=True, check=False)
return
except OSError: # No such file or directory
pass
Expand Down
2 changes: 1 addition & 1 deletion sphinx/testing/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def utime(self, arg: Any) -> None:
os.utime(self, arg)

def open(self, mode: str = 'r', **kwargs: Any) -> IO:
return open(self, mode, **kwargs) # noqa: SIM115
return open(self, mode, **kwargs) # NoQA: SIM115

def write_text(self, text: str, encoding: str = 'utf-8', **kwargs: Any) -> None:
"""
Expand Down
2 changes: 1 addition & 1 deletion sphinx/writers/texinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def _add_detailed_menu(name: str) -> None:
entries = self.node_menus[name]
if not entries:
return
self.body.append(f'\n{self.escape(self.node_names[name], )}\n\n')
self.body.append(f'\n{self.escape(self.node_names[name])}\n\n')
self.add_menu_entries(entries)
for subentry in entries:
_add_detailed_menu(subentry)
Expand Down
3 changes: 2 additions & 1 deletion tests/test_ext_imgconverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ def _if_converter_found(app):
image_converter = getattr(app.config, 'image_converter', '')
try:
if image_converter:
subprocess.run([image_converter, '-version'], capture_output=True) # show version
# print the image_converter version, to check that the command is available
subprocess.run([image_converter, '-version'], capture_output=True, check=False)
return
except OSError: # No such file or directory
pass
Expand Down
3 changes: 1 addition & 2 deletions tests/test_pycode_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
("a and b and c", "a and b and c"), # BoolOp
("b'bytes'", "b'bytes'"), # Bytes
("object()", "object()"), # Call
("1234", "1234"), # Constant
("1234", "1234"), # Constant, Num
("{'key1': 'value1', 'key2': 'value2'}",
"{'key1': 'value1', 'key2': 'value2'}"), # Dict
("a / b", "a / b"), # Div
Expand All @@ -34,7 +34,6 @@
("a % b", "a % b"), # Mod
("a * b", "a * b"), # Mult
("sys", "sys"), # Name, NameConstant
("1234", "1234"), # Num
("not a", "not a"), # Not
("a or b", "a or b"), # Or
("a**b", "a**b"), # Pow
Expand Down