Skip to content

Commit 9bcc91c

Browse files
committed
Update pythonwhat is_instance documentation
1 parent 1140abb commit 9bcc91c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pythonwhat/checks/check_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def is_instance(state, inst, not_instance_msg=None):
204204
used to 'zoom in' on the object of interest.
205205
206206
Args:
207-
inst (class): The class that the object should have.
207+
inst (str): The class that the object should have as a string.
208208
not_instance_msg (str): When specified, this overrides the automatically generated message in case
209209
the object does not have the expected class.
210210
state (State): The state that is passed in through the SCT chain (don't specify this).
@@ -220,7 +220,7 @@ def is_instance(state, inst, not_instance_msg=None):
220220
221221
# Verify the class of arr
222222
import numpy
223-
Ex().check_object('arr').is_instance(numpy.ndarray)
223+
Ex().check_object('arr').is_instance('numpy.ndarray')
224224
"""
225225

226226
state.assert_is(["object_assignments"], "is_instance", ["check_object"])

0 commit comments

Comments
 (0)