def load_from_dir(self, dirname, recurse=False, **check_args):
checks = []
for entry in os.scandir(dirname):
if recurse and entry.is_dir():
checks.extend(
self.load_from_dir(entry.path, recurse, **check_args)
)
if (entry.name.startswith('.') or
not entry.name.endswith('.py') or
not entry.is_file()):
continue
checks.extend(self.load_from_file(entry.path, **check_args))
return checks
评论列表
文章目录