Skip to content

Commit

Permalink
Fixes misc/proper_plugin crash on isinstance(1) (#11136)
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn authored Sep 18, 2021
1 parent c6e8a0b commit 836ff14
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions misc/proper_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def get_function_hook(self, fullname: str


def isinstance_proper_hook(ctx: FunctionContext) -> Type:
if len(ctx.arg_types) != 2 or not ctx.arg_types[1]:
return ctx.default_return_type

right = get_proper_type(ctx.arg_types[1][0])
for arg in ctx.arg_types[0]:
if (is_improper_type(arg) or
Expand Down

0 comments on commit 836ff14

Please sign in to comment.