mirror of
https://github.com/davidhalter/jedi.git
synced 2025-12-09 07:14:48 +08:00
variables starting with 'class' and 'def' should not slow down the parser, changed the check to 'class ' and 'def '.
This commit is contained in:
@@ -163,6 +163,17 @@ def test_for():
|
|||||||
check_fp(src, 1)
|
check_fp(src, 1)
|
||||||
|
|
||||||
|
|
||||||
|
def test_class_with_class_var():
|
||||||
|
src = dedent("""\
|
||||||
|
class SuperClass:
|
||||||
|
class_super = 3
|
||||||
|
def __init__(self):
|
||||||
|
self.foo = 4
|
||||||
|
pass
|
||||||
|
""")
|
||||||
|
check_fp(src, 3)
|
||||||
|
|
||||||
|
|
||||||
def test_func_with_if():
|
def test_func_with_if():
|
||||||
src = dedent("""\
|
src = dedent("""\
|
||||||
def recursion(a):
|
def recursion(a):
|
||||||
|
|||||||
Reference in New Issue
Block a user