aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/envconfig.py
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2020-09-03 11:42:53 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2020-09-08 20:15:59 +0200
commit4253bf62814997bd2c985a2a72e86c260338fb4d (patch)
tree0c6a6b1f52a6fd9d354369064362cc0d2d9942c1 /mesonbuild/envconfig.py
parent1743f636fdb67c7569711e8cabd2d7440ba265be (diff)
downloadmeson-4253bf62814997bd2c985a2a72e86c260338fb4d.zip
meson-4253bf62814997bd2c985a2a72e86c260338fb4d.tar.gz
meson-4253bf62814997bd2c985a2a72e86c260338fb4d.tar.bz2
typing: Fix code review
Diffstat (limited to 'mesonbuild/envconfig.py')
-rw-r--r--mesonbuild/envconfig.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py
index 836ec06..3c562f3 100644
--- a/mesonbuild/envconfig.py
+++ b/mesonbuild/envconfig.py
@@ -147,7 +147,7 @@ class Properties:
return p
return mesonlib.listify(p)
- def __eq__(self, other: object) -> 'T.Union[bool, NotImplemented]':
+ def __eq__(self, other: object) -> bool:
if isinstance(other, type(self)):
return self.properties == other.properties
return NotImplemented
@@ -172,8 +172,8 @@ class MachineInfo:
self.endian = endian
self.is_64_bit = cpu_family in CPU_FAMILES_64_BIT # type: bool
- def __eq__(self, other: object) -> 'T.Union[bool, NotImplemented]':
- if self.__class__ is not other.__class__ or not isinstance(other, MachineInfo):
+ def __eq__(self, other: object) -> bool:
+ if not isinstance(other, MachineInfo):
return NotImplemented
return \
self.system == other.system and \
@@ -181,8 +181,8 @@ class MachineInfo:
self.cpu == other.cpu and \
self.endian == other.endian
- def __ne__(self, other: object) -> 'T.Union[bool, NotImplemented]':
- if self.__class__ is not other.__class__ or not isinstance(other, MachineInfo):
+ def __ne__(self, other: object) -> bool:
+ if not isinstance(other, MachineInfo):
return NotImplemented
return not self.__eq__(other)