##// END OF EJS Templates
import-checker: loop to get list of locally defined modules at first...
FUJIWARA Katsunori -
r25064:3bbbadf6 default
parent child Browse files
Show More
@@ -221,11 +221,14 b' def main(argv):'
221 if argv[1] == '-':
221 if argv[1] == '-':
222 argv = argv[:1]
222 argv = argv[:1]
223 argv.extend(l.rstrip() for l in sys.stdin.readlines())
223 argv.extend(l.rstrip() for l in sys.stdin.readlines())
224 localmods = {}
224 used_imports = {}
225 used_imports = {}
225 any_errors = False
226 any_errors = False
226 for source_path in argv[1:]:
227 for source_path in argv[1:]:
228 modname = dotted_name_of_path(source_path, trimpure=True)
229 localmods[modname] = source_path
230 for modname, source_path in sorted(localmods.iteritems()):
227 f = open(source_path)
231 f = open(source_path)
228 modname = dotted_name_of_path(source_path, trimpure=True)
229 src = f.read()
232 src = f.read()
230 used_imports[modname] = sorted(
233 used_imports[modname] = sorted(
231 imported_modules(src, ignore_nested=True))
234 imported_modules(src, ignore_nested=True))
General Comments 0
You need to be logged in to leave comments. Login now