mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-25 13:16:42 +08:00
Move isinstance checks back to unary type checks
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user