Skip to content

Commit

Permalink
If even just one test has Any type then the whole expression will b…
Browse files Browse the repository at this point in the history
…e `Any`
  • Loading branch information
pdmccormick committed Jun 3, 2016
1 parent d11b4bc commit 00faff4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -1833,8 +1833,7 @@ def visit_except_handler_test(self, n: Node) -> Type:

for ttype in test_types:
if isinstance(ttype, AnyType):
all_types.append(ttype)
continue
return AnyType()

if not isinstance(ttype, FunctionLike):
self.fail(messages.INVALID_EXCEPTION_TYPE, n)
Expand Down

0 comments on commit 00faff4

Please sign in to comment.