Cyberslas 84402e755f Fix Python Function List not showing functions
Functions defined at the top of the file or below a class with nothing in between would not show in the Function List.
This changes the function regex to fix this. A small unit test that the old regex won't pass but the new will included.

Close #9844
2021-05-11 23:48:22 +02:00

25 lines
435 B
Plaintext

def invisible_function1(): # invisible because at file start
pass
class VisibleClass1:
def __init__(self):
pass
def invisible_function2(): # invisible because nothing but linebreaks between VisibleClass1 and invisible_function2
pass
class VisibleClass2:
def __init__(self):
pass
# visible because there is something between VisibleClass2 and visible_function
def visible_function():
pass