diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2021-10-21 19:05:27 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2021-10-27 09:51:52 -0400 |
commit | 894735288920816b9ad668ca27ce2e013a3f2640 (patch) | |
tree | 62d4d41bd5adf436507968447480c08120a14a6e /mesonbuild/compilers/cuda.py | |
parent | 81a2c1b36d91702d82234136ed1868c7118af322 (diff) | |
download | meson-894735288920816b9ad668ca27ce2e013a3f2640.zip meson-894735288920816b9ad668ca27ce2e013a3f2640.tar.gz meson-894735288920816b9ad668ca27ce2e013a3f2640.tar.bz2 |
fix various flake8 whitespace errors
Diffstat (limited to 'mesonbuild/compilers/cuda.py')
-rw-r--r-- | mesonbuild/compilers/cuda.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py index 5a7df73..1f396e4 100644 --- a/mesonbuild/compilers/cuda.py +++ b/mesonbuild/compilers/cuda.py @@ -171,7 +171,7 @@ class CudaCompiler(Compiler): '--qpp-config': '-qpp-config', # 4.2.8.19 } # Reverse map -short to --long options. - _FLAG_SHORT2LONG_WITHARGS = {v:k for k,v in _FLAG_LONG2SHORT_WITHARGS.items()} + _FLAG_SHORT2LONG_WITHARGS = {v: k for k, v in _FLAG_LONG2SHORT_WITHARGS.items()} def __init__(self, exelist: T.List[str], version: str, for_machine: MachineChoice, is_cross: bool, exe_wrapper: T.Optional['ExternalProgram'], @@ -186,7 +186,7 @@ class CudaCompiler(Compiler): self.warn_args = {level: self._to_host_flags(flags) for level, flags in host_compiler.warn_args.items()} @classmethod - def _shield_nvcc_list_arg(cls, arg: str, listmode: bool=True) -> str: + def _shield_nvcc_list_arg(cls, arg: str, listmode: bool = True) -> str: r""" Shield an argument against both splitting by NVCC's list-argument parse logic, and interpretation by any shell. @@ -390,11 +390,11 @@ class CudaCompiler(Compiler): val = next(flagit) # -o something except StopIteration: pass - elif flag.split('=',1)[0] in self._FLAG_LONG2SHORT_WITHARGS or \ - flag.split('=',1)[0] in self._FLAG_SHORT2LONG_WITHARGS: + elif flag.split('=', 1)[0] in self._FLAG_LONG2SHORT_WITHARGS or \ + flag.split('=', 1)[0] in self._FLAG_SHORT2LONG_WITHARGS: # This is either -o or a multi-letter flag, and it is receiving its # value after an = sign. - flag, val = flag.split('=',1) # -o=something + flag, val = flag.split('=', 1) # -o=something # Some dependencies (e.g., BoostDependency) add unspaced "-isystem/usr/include" arguments elif flag.startswith('-isystem'): val = flag[8:].strip() @@ -427,9 +427,9 @@ class CudaCompiler(Compiler): assert val is not None # Should only trip if there is a missing argument. # Take care of the various NVCC-supported flags that need special handling. - flag = self._FLAG_LONG2SHORT_WITHARGS.get(flag,flag) + flag = self._FLAG_LONG2SHORT_WITHARGS.get(flag, flag) - if flag in {'-include','-isystem','-I','-L','-l'}: + if flag in {'-include', '-isystem', '-I', '-L', '-l'}: # These flags are known to GCC, but list-valued in NVCC. They potentially # require double-quoting to prevent NVCC interpreting the flags as lists # when GCC would not have done so. |