diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-01-06 15:35:44 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-01-08 15:28:17 +0100 |
commit | cb262ab4816b8e8a47550994e0ba8869edf5c0ed (patch) | |
tree | 20aae022a934f45b0b6f05d30abd68bd7ddc8201 | |
parent | 09b53c534f74806ebc49bb2fcdfbae0e3b26fb84 (diff) | |
download | meson-cb262ab4816b8e8a47550994e0ba8869edf5c0ed.zip meson-cb262ab4816b8e8a47550994e0ba8869edf5c0ed.tar.gz meson-cb262ab4816b8e8a47550994e0ba8869edf5c0ed.tar.bz2 |
types: Fix/ignore flake8 B014/F811
-rw-r--r-- | mesonbuild/compilers/compilers.py | 22 | ||||
-rw-r--r-- | mesonbuild/mesonlib.py | 4 |
2 files changed, 13 insertions, 13 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index ec2b24b..5e8e18f 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -446,26 +446,26 @@ class CompilerArgs(T.MutableSequence[str]): self.compiler = compiler self.__container = list(iterable) if iterable is not None else [] # type: T.List[str] - @T.overload - def __getitem__(self, index: int) -> str: + @T.overload # noqa: F811 + def __getitem__(self, index: int) -> str: # noqa: F811 pass - @T.overload - def __getitem__(self, index: slice) -> T.List[str]: + @T.overload # noqa: F811 + def __getitem__(self, index: slice) -> T.List[str]: # noqa: F811 pass - def __getitem__(self, index): + def __getitem__(self, index): # noqa: F811 return self.__container[index] - @T.overload - def __setitem__(self, index: int, value: str) -> None: + @T.overload # noqa: F811 + def __setitem__(self, index: int, value: str) -> None: # noqa: F811 pass - @T.overload - def __setitem__(self, index: slice, value: T.List[str]) -> None: + @T.overload # noqa: F811 + def __setitem__(self, index: slice, value: T.List[str]) -> None: # noqa: F811 pass - def __setitem__(self, index, value) -> None: + def __setitem__(self, index, value) -> None: # noqa: F811 self.__container[index] = value def __delitem__(self, index: T.Union[int, slice]) -> None: @@ -929,7 +929,7 @@ class Compiler: p.output_name = output p.cached = False # Make sure that the cached attribute always exists yield p - except (PermissionError, OSError): + except OSError: # On Windows antivirus programs and the like hold on to files so # they can't be deleted. There's not much to do in this case. Also, # catch OSError because the directory is then no longer empty. diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 096f4a9..9ae7b76 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -1271,7 +1271,7 @@ def windows_proof_rmtree(f): return except FileNotFoundError: return - except (OSError, PermissionError): + except OSError: time.sleep(d) # Try one last time and throw if it fails. shutil.rmtree(f) @@ -1288,7 +1288,7 @@ def windows_proof_rm(fpath): return except FileNotFoundError: return - except (OSError, PermissionError): + except OSError: time.sleep(d) os.unlink(fpath) |