style: ensure trailing commas in multi-line statements

This commit is contained in:
jakob.scheid committed 2026-09-18 22:18:13 +02:00
1 parent ffcc7404de
commit 475775eb7e
30 files changed
+1778 -1774

No files matched your search

+10 -10
View File
@@ -25,7 +25,7 @@ __all__ = [
'existing_directory',
'error',
'create_argument_parser',
'main'
'main',
]
_LANG_PYTHON = 'python'
@@ -70,33 +70,33 @@ def create_argument_parser() -> argparse.ArgumentParser:
type = existing_directory,
nargs = '?',
default = pathlib.Path('.'),
help = 'The directory of the project'
help = 'The directory of the project',
)
common_parser.add_argument(
'-o',
'--output-dir',
type = pathlib.Path,
help = 'the output directory the documentation will be written to'
help = 'the output directory the documentation will be written to',
)
argument_parser = argparse.ArgumentParser()
subparsers = argument_parser.add_subparsers(
dest = 'language',
required = True
required = True,
)
python_parser = subparsers.add_parser(
_LANG_PYTHON,
parents = [common_parser],
help = 'generate documentation for Python project'
help = 'generate documentation for Python project',
)
python_parser.add_argument(
'-s',
'--sections',
nargs = '+',
choices = VALID_PYTHON_SECTIONS,
help = 'the sections to be included in the documentation'
help = 'the sections to be included in the documentation',
)
python_parser.add_argument(
'-S',
@@ -107,7 +107,7 @@ def create_argument_parser() -> argparse.ArgumentParser:
help = (
'the sections to be excluded in the documentation. '
'If a section shall be included AND excluded, it is excluded.'
)
),
)
python_parser.add_argument(
'-H',
@@ -116,7 +116,7 @@ def create_argument_parser() -> argparse.ArgumentParser:
help = (
'indicates whether HTML is allowed in the documentation. '
'By default, HTML is disabled.'
)
),
)
python_parser.add_argument(
'-T',
@@ -126,7 +126,7 @@ def create_argument_parser() -> argparse.ArgumentParser:
'indicates whether Markdown tables are allowed in the '
'documentation. By default, Markdown tables are disabled. '
'Warning: Markdown tables are not CommonMark.'
)
),
)
return argument_parser
@@ -147,7 +147,7 @@ def main(argv = None) -> int:
include_sections = args.sections,
exclude_sections = args.sections_exclude,
allow_html = args.allow_html,
allow_tables = args.allow_tables
allow_tables = args.allow_tables,
)
except FileNotFoundError as exc:
return error(f'{exc.filename}: no such file or directory')