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: