mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-07 22:44:27 +08:00
multi line funcs with comments don't raise an error anymore - fixes jedi-vim issue 29
This commit is contained in:
@@ -1426,6 +1426,11 @@ class PyFuzzyParser(object):
|
|||||||
else:
|
else:
|
||||||
token_type, tok = self.next()
|
token_type, tok = self.next()
|
||||||
|
|
||||||
|
while token_type == tokenize.COMMENT:
|
||||||
|
# remove newline and comment
|
||||||
|
self.next()
|
||||||
|
token_type, tok = self.next()
|
||||||
|
|
||||||
first_pos = self.start_pos
|
first_pos = self.start_pos
|
||||||
opening_brackets = ['{', '(', '[']
|
opening_brackets = ['{', '(', '[']
|
||||||
closing_brackets = ['}', ')', ']']
|
closing_brackets = ['}', ')', ']']
|
||||||
|
|||||||
@@ -38,6 +38,14 @@ def variable_rename(param):
|
|||||||
#? int()
|
#? int()
|
||||||
variable_rename(1)
|
variable_rename(1)
|
||||||
|
|
||||||
|
def multi_line_func(a, # comment blabla
|
||||||
|
|
||||||
|
b):
|
||||||
|
return b
|
||||||
|
|
||||||
|
#? str()
|
||||||
|
multi_line_func(1,'')
|
||||||
|
|
||||||
# -----------------
|
# -----------------
|
||||||
# double execution
|
# double execution
|
||||||
# -----------------
|
# -----------------
|
||||||
|
|||||||
5
test/completion/thirdparty/pylab_.py
vendored
5
test/completion/thirdparty/pylab_.py
vendored
@@ -1,5 +1,4 @@
|
|||||||
import pylab
|
import pylab
|
||||||
pylab.
|
|
||||||
|
|
||||||
# two gotos
|
# two gotos
|
||||||
#! ['module numpy']
|
#! ['module numpy']
|
||||||
@@ -29,3 +28,7 @@ import numpy
|
|||||||
na = numpy.array([1,2])
|
na = numpy.array([1,2])
|
||||||
#? ['shape']
|
#? ['shape']
|
||||||
na.shape
|
na.shape
|
||||||
|
|
||||||
|
fig = pylab.figure()
|
||||||
|
#!
|
||||||
|
fig.add_subplot
|
||||||
|
|||||||
Reference in New Issue
Block a user