Skip to content

Commit d13a16b

Browse files
Apply code formatting on Python source files
1 parent 1f96140 commit d13a16b

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

scripts/generate_docs.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
from pathlib import Path
99
from shutil import rmtree
10-
import subprocess # nosec B404
10+
import subprocess # nosec B404
1111
import time
1212

1313

@@ -41,8 +41,9 @@ def _prepare_docs_dir(docs_path: Path) -> None:
4141
def _generate_xml(config_path: Path, docs_path: Path) -> None:
4242
print("Generating XML files with doxygen...", flush=True)
4343
try:
44-
subprocess.run(["doxygen", Path(config_path, "Doxyfile")], text=True
45-
).check_returncode() # nosec B603, B607
44+
subprocess.run(
45+
["doxygen", Path(config_path, "Doxyfile")], text=True
46+
).check_returncode() # nosec B603, B607
4647
print(f"All XML files generated in {docs_path}", flush=True)
4748
except subprocess.CalledProcessError as ex:
4849
print("Generating XML files failed!")
@@ -53,8 +54,9 @@ def _generate_xml(config_path: Path, docs_path: Path) -> None:
5354
def _generate_html(config_path: Path, docs_path: Path) -> None:
5455
print("Generating HTML pages with sphinx...", flush=True)
5556
try:
56-
subprocess.run(["sphinx-build", config_path, Path(docs_path, "html")], text=True
57-
).check_returncode() # nosec B603, B607
57+
subprocess.run(
58+
["sphinx-build", config_path, Path(docs_path, "html")], text=True
59+
).check_returncode() # nosec B603, B607
5860
print(f"All HTML files generated in {docs_path}", flush=True)
5961
except subprocess.CalledProcessError as ex:
6062
print("Generating HTML pages failed!")

test/test_installation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import difflib
1010
from pathlib import Path
1111
import platform
12-
import subprocess # nosec B404
12+
import subprocess # nosec B404
1313
import sys
1414
from typing import List
1515

@@ -61,7 +61,7 @@ def _create_match_list(self) -> List[str]:
6161
lib_ext_static = "a"
6262
lib_ext_shared = "so"
6363
lib_prefix = "lib"
64-
else: # MacOS
64+
else: # MacOS
6565
lib_ext_static = "a"
6666
lib_ext_shared = "dylib"
6767
lib_prefix = "lib"
@@ -138,7 +138,7 @@ def install_umf(self) -> None:
138138

139139
install_cmd = f"cmake --install {self.build_dir} --config {self.build_type.title()} --prefix {self.install_dir}"
140140
try:
141-
subprocess.run(install_cmd.split()).check_returncode() # nosec B603
141+
subprocess.run(install_cmd.split()).check_returncode() # nosec B603
142142
except subprocess.CalledProcessError:
143143
sys.exit(f"Error: UMF installation command '{install_cmd}' failed")
144144

@@ -175,7 +175,7 @@ def uninstall_umf(self) -> None:
175175
"""
176176
uninstall_cmd = f"cmake --build {self.build_dir} --target uninstall"
177177
try:
178-
subprocess.run(uninstall_cmd.split()).check_returncode() # nosec B603
178+
subprocess.run(uninstall_cmd.split()).check_returncode() # nosec B603
179179
except subprocess.CalledProcessError:
180180
sys.exit(f"Error: UMF uninstallation command '{uninstall_cmd}' failed")
181181

0 commit comments

Comments
 (0)