diff options
author | Alf Henrik Sauge <alf.henrik.sauge@gmail.com> | 2022-08-11 15:18:27 +0200 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-08-26 17:12:40 -0400 |
commit | 06bf9a5cdae6a185a29e5ea5bcaf18ad3e3e042a (patch) | |
tree | a909a90a2734935d732dcc087dc173d80da76425 /mesonbuild/cmake/traceparser.py | |
parent | 47a0ed5924ea05ac58a9a36f60670b79e76c6273 (diff) | |
download | meson-06bf9a5cdae6a185a29e5ea5bcaf18ad3e3e042a.zip meson-06bf9a5cdae6a185a29e5ea5bcaf18ad3e3e042a.tar.gz meson-06bf9a5cdae6a185a29e5ea5bcaf18ad3e3e042a.tar.bz2 |
Fix purely white space issues reported by flake8
Diffstat (limited to 'mesonbuild/cmake/traceparser.py')
-rw-r--r-- | mesonbuild/cmake/traceparser.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py index 04c40a9..1dd636f 100644 --- a/mesonbuild/cmake/traceparser.py +++ b/mesonbuild/cmake/traceparser.py @@ -56,17 +56,17 @@ class CMakeTarget: name: str, target_type: str, properties: T.Optional[T.Dict[str, T.List[str]]] = None, - imported: bool = False, - tline: T.Optional[CMakeTraceLine] = None + imported: bool = False, + tline: T.Optional[CMakeTraceLine] = None ): if properties is None: properties = {} - self.name = name - self.type = target_type - self.properties = properties - self.imported = imported - self.tline = tline - self.depends = [] # type: T.List[str] + self.name = name + self.type = target_type + self.properties = properties + self.imported = imported + self.tline = tline + self.depends = [] # type: T.List[str] self.current_bin_dir = None # type: T.Optional[Path] self.current_src_dir = None # type: T.Optional[Path] @@ -95,9 +95,9 @@ class CMakeGeneratorTarget(CMakeTarget): class CMakeTraceParser: def __init__(self, cmake_version: str, build_dir: Path, env: 'Environment', permissive: bool = True) -> None: - self.vars: T.Dict[str, T.List[str]] = {} - self.vars_by_file: T.Dict[Path, T.Dict[str, T.List[str]]] = {} - self.targets: T.Dict[str, CMakeTarget] = {} + self.vars: T.Dict[str, T.List[str]] = {} + self.vars_by_file: T.Dict[Path, T.Dict[str, T.List[str]]] = {} + self.targets: T.Dict[str, CMakeTarget] = {} self.cache: T.Dict[str, CMakeCacheEntry] = {} self.explicit_headers = set() # type: T.Set[Path] @@ -203,7 +203,7 @@ class CMakeTraceParser: fn(l) # Evaluate generator expressions - strlist_gen: T.Callable[[T.List[str]], T.List[str]] = lambda strlist: parse_generator_expressions(';'.join(strlist), self).split(';') if strlist else [] + strlist_gen: T.Callable[[T.List[str]], T.List[str]] = lambda strlist: parse_generator_expressions(';'.join(strlist), self).split(';') if strlist else [] pathlist_gen: T.Callable[[T.List[str]], T.List[Path]] = lambda strlist: [Path(x) for x in parse_generator_expressions(';'.join(strlist), self).split(';')] if strlist else [] self.vars = {k: strlist_gen(v) for k, v in self.vars.items()} @@ -303,10 +303,10 @@ class CMakeTraceParser: """ # DOC: https://cmake.org/cmake/help/latest/command/set.html - cache_type = None + cache_type = None cache_force = 'FORCE' in tline.args try: - cache_idx = tline.args.index('CACHE') + cache_idx = tline.args.index('CACHE') cache_type = tline.args[cache_idx + 1] except (ValueError, IndexError): pass @@ -466,7 +466,7 @@ class CMakeTraceParser: cbinary_dir = self.var_to_str('MESON_PS_CMAKE_CURRENT_BINARY_DIR') csource_dir = self.var_to_str('MESON_PS_CMAKE_CURRENT_SOURCE_DIR') - target.working_dir = Path(working_dir) if working_dir else None + target.working_dir = Path(working_dir) if working_dir else None target.current_bin_dir = Path(cbinary_dir) if cbinary_dir else None target.current_src_dir = Path(csource_dir) if csource_dir else None target._outputs_str = self._guess_files(target._outputs_str) |