diff options
-rw-r--r-- | mesonbuild/build.py | 8 | ||||
-rw-r--r-- | mesonbuild/compilers/compilers.py | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 72b4276..0eb930b 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -355,22 +355,22 @@ a hard error in the future.''' % name) if not hasattr(self, 'typename'): raise RuntimeError('Target type is not set for target class "{}". This is a bug'.format(type(self).__name__)) - def __lt__(self, other: T.Any) -> T.Union[bool, 'NotImplemented']: + def __lt__(self, other: T.Any) -> T.Union[bool, type(NotImplemented)]: if not hasattr(other, 'get_id') and not callable(other.get_id): return NotImplemented return self.get_id() < other.get_id() - def __le__(self, other: T.Any) -> T.Union[bool, 'NotImplemented']: + def __le__(self, other: T.Any) -> T.Union[bool, type(NotImplemented)]: if not hasattr(other, 'get_id') and not callable(other.get_id): return NotImplemented return self.get_id() <= other.get_id() - def __gt__(self, other: T.Any) -> T.Union[bool, 'NotImplemented']: + def __gt__(self, other: T.Any) -> T.Union[bool, type(NotImplemented)]: if not hasattr(other, 'get_id') and not callable(other.get_id): return NotImplemented return self.get_id() > other.get_id() - def __ge__(self, other: T.Any) -> T.Union[bool, 'NotImplemented']: + def __ge__(self, other: T.Any) -> T.Union[bool, type(NotImplemented)]: if not hasattr(other, 'get_id') and not callable(other.get_id): return NotImplemented return self.get_id() >= other.get_id() 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 |