From 627266b38da6b82a6405a7a9da3e0ee753f1e370 Mon Sep 17 00:00:00 2001 From: Laurens Van Houtven <_@lvh.cc> Date: Thu, 11 Jul 2013 20:36:00 +0200 Subject: [PATCH] Move isinstance checks back to unary type checks --- jedi/dynamic.py | 2 +- jedi/evaluate_representation.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jedi/dynamic.py b/jedi/dynamic.py index 92c95dfb..325946bb 100644 --- a/jedi/dynamic.py +++ b/jedi/dynamic.py @@ -526,7 +526,7 @@ def check_statement_information(stmt, search_name): # this might be removed if we analyze and, etc assert len(commands) == 1 call = commands[0] - assert isinstance(call, pr.Call) and str(call.name) == 'isinstance' + assert type(call) is pr.Call and str(call.name) == 'isinstance' assert bool(call.execution) # isinstance check diff --git a/jedi/evaluate_representation.py b/jedi/evaluate_representation.py index ab12b1ab..d9967c96 100644 --- a/jedi/evaluate_representation.py +++ b/jedi/evaluate_representation.py @@ -643,7 +643,7 @@ class Execution(Executable): call = key_stmt.get_commands()[0] if isinstance(call, pr.Name): yield call, value_stmt - elif isinstance(call, pr.Call): + elif type(call) is pr.Call: yield call.name, value_stmt # Normal arguments (including key arguments). else: