File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -579,7 +579,7 @@ def set_docstring(self):
579
579
self .docstring = None
580
580
if not self .get_args ():
581
581
self .funcprops = None
582
- elif self .current_func is not None :
582
+ if self .current_func is not None :
583
583
try :
584
584
self .docstring = pydoc .getdoc (self .current_func )
585
585
except IndexError :
Original file line number Diff line number Diff line change @@ -222,6 +222,13 @@ def test_issue572(self):
222
222
self .set_input_line ("WonderfulSpam(" )
223
223
self .assertTrue (self .repl .get_args ())
224
224
225
+ def test_issue583 (self ):
226
+ self .repl = FakeRepl ()
227
+ self .repl .push ("a = 1.2\n " , False )
228
+ self .set_input_line ("a.is_integer(" )
229
+ self .repl .set_docstring ()
230
+ self .assertIsNot (self .repl .docstring , None )
231
+
225
232
226
233
class TestGetSource (unittest .TestCase ):
227
234
def setUp (self ):
You can’t perform that action at this time.
0 commit comments