CoatiSoftware / SourcetrailPythonIndexer

Python Indexer for Sourcetrail based on jedi, parso and SourcetrailDB
GNU General Public License v3.0
90 stars 28 forks source link

Default argument of function is "unsolved" if it has the same name as the function #28

Closed mlangkabel closed 5 years ago

mlangkabel commented 5 years ago

Consider the following code snippet:

foo = 9

def foo(baz=foo):
    pass

Here the indexer fails to resolve the default argument for the parameter baz to be a usage of the global variable foo which is defined in the first line of the snippet.

mlangkabel commented 5 years ago

Reported this issue on the Jedi tracker: https://github.com/davidhalter/jedi/issues/1310

mlangkabel commented 5 years ago

Fixed by merge of pull request #47.