2008-06-21 | Paul Boddie | raw annotate files changeset graph | Added support for the detection of module attribute assignment. Added some more tests of module assignment. Introduced better system path initialisation based on the program being inspected. |
1 #!/usr/bin/env python 2 3 import imported 4 5 imported.attr = 456 # detected with warning 6 7 m = imported 8 imported.a = 9 # detected with warning 9 m.a = 8 # detected with warning (m is always imported) 10 11 imported.x = 1 # detected with warning (despite no collision) 12 13 n = None 14 n = imported 15 n.y = 2 # not detected due to reassignment of n 16 n.y = 3 # not detected due to reassignment of n 17 18 # vim: tabstop=4 expandtab shiftwidth=4