Skip to content

Commit

Permalink
Catch all exceptions to return empty annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
tirkarthi committed Apr 14, 2021
1 parent 3cc34a3 commit 6d74c1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion testslide/strict_mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def __validate_attribute_type(self, name: str, value: Any) -> None:
if self._template is not None:
try:
annotations = get_type_hints(self._template)
except KeyError:
except Exception:
# Some modules can throw KeyError : https://bugs.python.org/issue41515
annotations = {}
if name in annotations:
Expand Down

0 comments on commit 6d74c1b

Please sign in to comment.