tab2spaces.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:misc 作者: duboviy 项目源码 文件源码
def _process_paths(self):
        for path in self.path_list:

            if os.path.isfile(path):
                self._process(path)

            elif os.path.isdir(path):
                for root, dirs, files in os.walk(path):
                    for filename in fnmatch.filter(files, self.extension):
                        self._process(os.path.join(root, filename))
            else:
                raise TypeError('%s should be either dir or file' % path)

        if self.pretend:
            logging.info('No actual changes was done, run without \'-p\' to overwrite source files')

        logging.info('%d files processed' % self.files_processed)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号