CoatiSoftware / SourcetrailPythonIndexer

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

Boolean value "True" is recorded as "non-indexed global variable" #27

Closed mlangkabel closed 5 years ago

mlangkabel commented 5 years ago

Consider the following code sample:

class Test():
    def foo(self, bar=True):
        pass

Here the symbol True is recorded as non-indexed global variable, while there should not be a symbol recorded for this token (same as for any integer or string expression in the indexed code).

mlangkabel commented 5 years ago

The same happens if False or None are used as default values.

mlangkabel commented 5 years ago

It looks like this is only happening for Python 2.

mlangkabel commented 5 years ago

Fixed by merging pull request #36