aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-01-23 15:19:57 +0530
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2020-01-24 02:53:34 +0530
commitd8e738f04f9d1bf37b721ec1ff68956f7555b5ae (patch)
tree6069c91cdae2774f9cac3a73e5dd1093036ea241 /mesonbuild/compilers
parent806068304bed344a1b5cd71782c7df430084f44f (diff)
downloadmeson-d8e738f04f9d1bf37b721ec1ff68956f7555b5ae.zip
meson-d8e738f04f9d1bf37b721ec1ff68956f7555b5ae.tar.gz
meson-d8e738f04f9d1bf37b721ec1ff68956f7555b5ae.tar.bz2
typing: Fix compatibility with Python 3.5.2
Explicitly use the type instead of the string 'NotImplemented' which still works with Python 3.5.2 Fixes https://github.com/mesonbuild/meson/issues/6427
Diffstat (limited to 'mesonbuild/compilers')
-rw-r--r--mesonbuild/compilers/compilers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py
index 5e8e18f..cc321f1 100644
--- a/mesonbuild/compilers/compilers.py
+++ b/mesonbuild/compilers/compilers.py
@@ -655,7 +655,7 @@ class CompilerArgs(T.MutableSequence[str]):
new += self
return new
- def __eq__(self, other: T.Any) -> T.Union[bool, 'NotImplemented']:
+ def __eq__(self, other: T.Any) -> T.Union[bool, type(NotImplemented)]:
# Only allow equality checks against other CompilerArgs and lists instances
if isinstance(other, CompilerArgs):
return self.compiler == other.compiler and self.__container == other.__container