mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-09-28 01:57:14 +02:00
py: Various flake8 cleanups
None of these are particularly significant, but they do get the CI output clean. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
@@ -226,24 +226,29 @@ def codegen_main():
|
||||
arg_parser.add_argument(
|
||||
"--glib-min-required",
|
||||
metavar="VERSION",
|
||||
help="Minimum version of GLib to be supported by the outputted code (default: 2.30)",
|
||||
help="Minimum version of GLib to be supported by the outputted code "
|
||||
"(default: 2.30)",
|
||||
)
|
||||
arg_parser.add_argument(
|
||||
"--glib-max-allowed",
|
||||
metavar="VERSION",
|
||||
help="Maximum version of GLib to be used by the outputted code (default: current GLib version)",
|
||||
help="Maximum version of GLib to be used by the outputted code "
|
||||
"(default: current GLib version)",
|
||||
)
|
||||
arg_parser.add_argument(
|
||||
"--symbol-decorator",
|
||||
help="Macro used to decorate a symbol in the outputted header, possibly to export symbols",
|
||||
help="Macro used to decorate a symbol in the outputted header, "
|
||||
"possibly to export symbols",
|
||||
)
|
||||
arg_parser.add_argument(
|
||||
"--symbol-decorator-header",
|
||||
help="Additional header required for decorator specified by --symbol-decorator",
|
||||
help="Additional header required for decorator specified by "
|
||||
"--symbol-decorator",
|
||||
)
|
||||
arg_parser.add_argument(
|
||||
"--symbol-decorator-define",
|
||||
help="Additional define required for decorator specified by --symbol-decorator",
|
||||
help="Additional define required for decorator specified by "
|
||||
"--symbol-decorator",
|
||||
)
|
||||
|
||||
group = arg_parser.add_mutually_exclusive_group()
|
||||
@@ -370,11 +375,13 @@ def codegen_main():
|
||||
else:
|
||||
glib_max_allowed = (config.MAJOR_VERSION, config.MINOR_VERSION)
|
||||
|
||||
# Only allow --symbol-decorator-define and --symbol-decorator-header if --symbol-decorator is used
|
||||
# Only allow --symbol-decorator-define and --symbol-decorator-header if
|
||||
# --symbol-decorator is used
|
||||
if args.symbol_decorator is None:
|
||||
if args.symbol_decorator_header or args.symbol_decorator_define:
|
||||
print_error(
|
||||
"--symbol-decorator-define and --symbol-decorator-header must be used with --symbol-decorator"
|
||||
"--symbol-decorator-define and --symbol-decorator-header must "
|
||||
"be used with --symbol-decorator"
|
||||
)
|
||||
|
||||
# Round --glib-max-allowed up to the next stable release.
|
||||
@@ -411,7 +418,7 @@ def codegen_main():
|
||||
docbook = args.generate_docbook
|
||||
docbook_gen = codegen_docbook.DocbookCodeGenerator(all_ifaces)
|
||||
if docbook:
|
||||
ret = docbook_gen.generate(docbook, args.output_directory)
|
||||
docbook_gen.generate(docbook, args.output_directory)
|
||||
|
||||
if args.header:
|
||||
with open(h_file, "w") as outfile:
|
||||
|
Reference in New Issue
Block a user