Skip to content

Commit 1575214

Browse files
committed
Fix Python syntax error in doxygen markdown preprocessor
CodeQL was complaining that it couldn't scan our Python code for the invalid use of `**`. Python does not support repeat unpacking in that way, so use a list instead of a dict.
1 parent dd54106 commit 1575214

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/doxygen-root/doxygen-markdown/doxygen-markdown-preprocessor.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ def parse_arguments():
5353

5454

5555
def pandoc(path, pandoc_write, pandoc_wrap, pandoc_filter=None):
56-
args = {
57-
'--write': pandoc_write,
58-
'--wrap': pandoc_wrap
59-
}
56+
args = [
57+
'--write', pandoc_write,
58+
'--wrap', pandoc_wrap
59+
]
6060
if pandoc_filter:
61-
args['--filter'] = Path(pandoc_filter).resolve()
61+
args.extend(['--filter', Path(pandoc_filter).resolve()])
6262

6363

64-
lines = subprocess.run(['pandoc', **args, path],
64+
lines = subprocess.run(['pandoc', *args, path],
6565
check=True,
6666
text=True,
6767
capture_output=True).stdout.splitlines()

0 commit comments

Comments
 (0)