Hirse / brackets-outline-list

Extension for Brackets and Phoenix to display a list of the functions or definitions in the currently opened document.
MIT License
79 stars 30 forks source link

Python functions with float default arguments are not listed in the outline #97

Closed gittar closed 7 years ago

gittar commented 7 years ago

Details about your environment Ubuntu 16.04 LTS

What did you do? Please include the actual source code causing the issue.

# returns the name of the current function
def whoami(dummy=0):
    return inspect.stack()[1][3]

What did you expect to happen? How did you expect the Outline to look? I expected the function whoami to appear in the outline list.

What actually happened? How did the Outline actually look? The function did not appear in the outline. Others were listed ok.

Remark: The problem seems to be the default argument syntax (dummy=0). The following variants appear correctly in the outline list:

# returns the name of the current function
def whoami():
    return inspect.stack()[1][3]

def whoami(dummy):
    return inspect.stack()[1][3]
Hirse commented 7 years ago

I am sorry for the late reply, but it works fine for me with the default argument: image

Hirse commented 7 years ago

This was in fact fixed in https://github.com/Hirse/brackets-outline-list/pull/90 for 1.1.0

gittar commented 7 years ago

Please try again with a floating point default arg, e.g. (dummy=1.0). Recently I observed that only that did not work.

Hirse commented 7 years ago

Please see the latest release, that should solve it.