alecthomas / importmagic

A Python library for finding unresolved symbols in Python code, and the corresponding imports
BSD 2-Clause "Simplified" License
120 stars 20 forks source link

Importmagic doesn't treat variables used as default values as import requeriments #18

Closed whirm closed 9 years ago

whirm commented 9 years ago

For instance, this:


from simpledefs import NTFY_UPDATE, NTFY_INSERT, NTFY_DELETE

def add_observer(self, func, subject, changeTypes=[NTFY_UPDATE, NTFY_INSERT, NTFY_DELETE], id=None, cache=0):
    pass

Will result on the whole import line being dropped.

alecthomas commented 9 years ago

Thanks for the bug report!