Skip to content

Commit

Permalink
Fix Python syntax error in doxygen markdown preprocessor
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tautschnig committed Sep 4, 2024
1 parent 27b845c commit 953fedf
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ def parse_arguments():


def pandoc(path, pandoc_write, pandoc_wrap, pandoc_filter=None):
args = {
'--write': pandoc_write,
'--wrap': pandoc_wrap
}
args = [
'--write', pandoc_write,
'--wrap', pandoc_wrap
]
if pandoc_filter:
args['--filter'] = Path(pandoc_filter).resolve()
args.extend(['--filter', Path(pandoc_filter).resolve()])


lines = subprocess.run(['pandoc', **args, path],
lines = subprocess.run(['pandoc', *args, path],
check=True,
text=True,
capture_output=True).stdout.splitlines()
Expand Down

0 comments on commit 953fedf

Please sign in to comment.