From d8e738f04f9d1bf37b721ec1ff68956f7555b5ae Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 23 Jan 2020 15:19:57 +0530 Subject: 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 --- mesonbuild/compilers/compilers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mesonbuild/compilers/compilers.py') 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 -- cgit v1.1