Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.py

changeset 28
dde24fc7f7ba
parent 13
1af94a91f439
child 40
c2e5472b112c
equal deleted inserted replaced
27:1018a0347ae9 28:dde24fc7f7ba
69 (string or list of strings) 69 (string or list of strings)
70 """ 70 """
71 if isinstance(fn, list): 71 if isinstance(fn, list):
72 files = fn 72 files = fn
73 elif os.path.isdir(fn): 73 elif os.path.isdir(fn):
74 # TODO: make this dependant on configured extensions
74 files = Utilities.direntries(fn, 1, '*.py', 0) 75 files = Utilities.direntries(fn, 1, '*.py', 0)
75 files += Utilities.direntries(fn, 1, '*.pyw', 0) 76 files += Utilities.direntries(fn, 1, '*.pyw', 0)
76 files += Utilities.direntries(fn, 1, '*.ptl', 0) 77 files += Utilities.direntries(fn, 1, '*.ptl', 0)
77 else: 78 else:
78 files = [fn] 79 files = [fn]
80 # TODO: make this dependant on configured extensions
79 files = [f for f in files \ 81 files = [f for f in files \
80 if f.endswith(".py") or f.endswith(".pyw") or f.endswith(".ptl")] 82 if f.endswith(".py") or f.endswith(".pyw") or f.endswith(".ptl")]
81 83
82 if len(files) > 0: 84 if len(files) > 0:
83 self.checkProgress.setMaximum(len(files)) 85 self.checkProgress.setMaximum(len(files))

eric ide

mercurial