Open
Description
I have the following code which returns as attribute-error
unless silenced:
def __eq__(self, value: object) -> bool:
"""Dice are equal if they give the same probabilities."""
try:
return self.probabilities == value.probabilities # pytype: disable=attribute-error
except AttributeError:
return False
As handling attribute and type issues is a common case for try: ... except:
blocks it would be great if pytype automatically ignored type errors which were specifically handled in the code.
Metadata
Assignees
Labels
No labels