1
1
"""
2
- Copyright (C) 2023 Intel Corporation
2
+ Copyright (C) 2023-2024 Intel Corporation
3
3
4
4
Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
5
5
SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
6
"""
7
7
8
8
from pathlib import Path
9
9
from shutil import rmtree
10
- import subprocess
10
+ import subprocess # nosec B404
11
11
import time
12
12
13
13
@@ -41,9 +41,8 @@ def _prepare_docs_dir(docs_path: Path) -> None:
41
41
def _generate_xml (config_path : Path , docs_path : Path ) -> None :
42
42
print ("Generating XML files with doxygen..." , flush = True )
43
43
try :
44
- subprocess .run (
45
- ["doxygen" , Path (config_path , "Doxyfile" )], text = True
46
- ).check_returncode ()
44
+ subprocess .run (["doxygen" , Path (config_path , "Doxyfile" )], text = True
45
+ ).check_returncode () # nosec B603, B607
47
46
print (f"All XML files generated in { docs_path } " , flush = True )
48
47
except subprocess .CalledProcessError as ex :
49
48
print ("Generating XML files failed!" )
@@ -54,9 +53,8 @@ def _generate_xml(config_path: Path, docs_path: Path) -> None:
54
53
def _generate_html (config_path : Path , docs_path : Path ) -> None :
55
54
print ("Generating HTML pages with sphinx..." , flush = True )
56
55
try :
57
- subprocess .run (
58
- ["sphinx-build" , config_path , Path (docs_path , "html" )], text = True
59
- ).check_returncode ()
56
+ subprocess .run (["sphinx-build" , config_path , Path (docs_path , "html" )], text = True
57
+ ).check_returncode () # nosec B603, B607
60
58
print (f"All HTML files generated in { docs_path } " , flush = True )
61
59
except subprocess .CalledProcessError as ex :
62
60
print ("Generating HTML pages failed!" )
0 commit comments