eric6/Utilities/ClassBrowsers/pyclbr.py

changeset 7249
0bf517e60f54
parent 7229
53054eb5b15a
child 7259
7c017076c12e
equal deleted inserted replaced
7248:60b48ab891fa 7249:0bf517e60f54
607 last_lineno_pos = start 607 last_lineno_pos = start
608 pubs = Publics(module, file, lineno, idents) 608 pubs = Publics(module, file, lineno, idents)
609 dictionary['__all__'] = pubs 609 dictionary['__all__'] = pubs
610 610
611 elif m.start("Import") >= 0: 611 elif m.start("Import") >= 0:
612 # import module 612 ## import module
613 names = [n.strip() for n in 613 names = [n.strip() for n in
614 "".join(m.group("ImportList").splitlines()) 614 "".join(m.group("ImportList").splitlines())
615 .replace("\\", "").split(',')] 615 .replace("\\", "").split(',')]
616 lineno = lineno + src.count('\n', last_lineno_pos, start) 616 lineno = lineno + src.count('\n', last_lineno_pos, start)
617 last_lineno_pos = start 617 last_lineno_pos = start
619 dictionary["@@Import@@"] = Imports(module, file) 619 dictionary["@@Import@@"] = Imports(module, file)
620 for name in names: 620 for name in names:
621 dictionary["@@Import@@"].addImport(name, [], lineno) 621 dictionary["@@Import@@"].addImport(name, [], lineno)
622 622
623 elif m.start("ImportFrom") >= 0: 623 elif m.start("ImportFrom") >= 0:
624 # from module import stuff 624 ## from module import stuff
625 mod = m.group("ImportFromPath") 625 mod = m.group("ImportFromPath")
626 namesLines = (m.group("ImportFromList") 626 namesLines = (m.group("ImportFromList")
627 .replace("(", "").replace(")", "") 627 .replace("(", "").replace(")", "")
628 .replace("\\", "") 628 .replace("\\", "")
629 .strip().splitlines()) 629 .strip().splitlines())

eric ide

mercurial