对于以下函数
def __eq__(self, other: object) -> bool:
if not isinstance(other, Node):
return False
return other.address == self.address
mypy正在报道
error: Returning Any from function declared to return "bool" [no-any-return]
这似乎很奇怪,因为这两条语句似乎都明确地返回布尔值。有人能解释一下吗?
谢谢