diff options
author | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-09-01 19:58:10 +0200 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2020-09-08 20:15:58 +0200 |
commit | e681235e5fe3ee0a40dd6a3f5922c2c4b0cf98b4 (patch) | |
tree | 947e279889b5f7682dcd4c11beea279c24cb67bf /mesonbuild/envconfig.py | |
parent | 47373a2438c0fdeedd229b921c9d7e8dc1fc956a (diff) | |
download | meson-e681235e5fe3ee0a40dd6a3f5922c2c4b0cf98b4.zip meson-e681235e5fe3ee0a40dd6a3f5922c2c4b0cf98b4.tar.gz meson-e681235e5fe3ee0a40dd6a3f5922c2c4b0cf98b4.tar.bz2 |
typing: fix code review
Diffstat (limited to 'mesonbuild/envconfig.py')
-rw-r--r-- | mesonbuild/envconfig.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py index 1270666..836ec06 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: T.Any) -> 'T.Union[bool, NotImplemented]': + def __eq__(self, other: object) -> 'T.Union[bool, NotImplemented]': 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: T.Any) -> 'T.Union[bool, NotImplemented]': - if self.__class__ is not other.__class__: + def __eq__(self, other: object) -> 'T.Union[bool, NotImplemented]': + if self.__class__ is not other.__class__ or 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: T.Any) -> 'T.Union[bool, NotImplemented]': - if self.__class__ is not other.__class__: + def __ne__(self, other: object) -> 'T.Union[bool, NotImplemented]': + if self.__class__ is not other.__class__ or not isinstance(other, MachineInfo): return NotImplemented return not self.__eq__(other) |