diff options
| author | Alexandru Croitor <[email protected]> | 2019-10-10 16:32:19 +0200 |
|---|---|---|
| committer | Alexandru Croitor <[email protected]> | 2019-10-10 14:35:52 +0000 |
| commit | f1be97e01ebb22c4a8c6d2c22f685cd38a097148 (patch) | |
| tree | 95c41e2ab32ba07702a62eecbb7bc2dda1753d97 /util/cmake/qmake_parser.py | |
| parent | 174b17d65d2a181502c81cdd490f25da40d1c22d (diff) | |
Reformat conversion scripts with black
Change-Id: Ida7d42dc86c81315bc0727839a620fb68b7f0268
Reviewed-by: Leander Beernaert <[email protected]>
Reviewed-by: Simon Hausmann <[email protected]>
Reviewed-by: Alexandru Croitor <[email protected]>
Diffstat (limited to 'util/cmake/qmake_parser.py')
| -rw-r--r-- | util/cmake/qmake_parser.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/util/cmake/qmake_parser.py b/util/cmake/qmake_parser.py index e75e8849592..95cbe8aa5bf 100644 --- a/util/cmake/qmake_parser.py +++ b/util/cmake/qmake_parser.py @@ -35,6 +35,7 @@ from itertools import chain import pyparsing as pp # type: ignore from helper import _set_up_py_parsing_nicer_debug_output + _set_up_py_parsing_nicer_debug_output(pp) @@ -99,7 +100,7 @@ def handle_function_value(group: pp.ParseResults): if function_name == "basename": if len(function_args) != 1: print(f"XXXX basename with more than one argument") - if function_args[0] == '_PRO_FILE_PWD_': + if function_args[0] == "_PRO_FILE_PWD_": return os.path.basename(os.getcwd()) print(f"XXXX basename with value other than _PRO_FILE_PWD_") return os.path.basename(str(function_args[0])) @@ -192,7 +193,12 @@ class QmakeParser: Values = add_element("Values", pp.ZeroOrMore(Value)("value")) Op = add_element( - "OP", pp.Literal("=") | pp.Literal("-=") | pp.Literal("+=") | pp.Literal("*=") | pp.Literal("~=") + "OP", + pp.Literal("=") + | pp.Literal("-=") + | pp.Literal("+=") + | pp.Literal("*=") + | pp.Literal("~="), ) Key = add_element("Key", Identifier) @@ -219,7 +225,7 @@ class QmakeParser: def parse_requires_condition(s, l, t): # The following expression unwraps the condition via the additional info # set by originalTextFor. - condition_without_parentheses = s[t._original_start + 1: t._original_end - 1] + condition_without_parentheses = s[t._original_start + 1 : t._original_end - 1] # And this replaces the colons with '&&' similar how it's done for 'Condition'. condition_without_parentheses = ( |
