我需要创建一个简单的脚本来修复存储库的 python 脚本中的缩进。我fix_multiple_files
在 autopep8 模块中找到:
import autopep8
autopep8.fix_multiple_files('/home/playrix/work/ci-teamcity/scripts/', options={'recursive': 1})
每次我运行脚本时都会得到这个:
Traceback (most recent call last):
File "/home/playrix/work/ci-teamcity/scripts/1.py", line 4, in <module>
autopep8.fix_multiple_files('/home/playrix/work/ci-teamcity/scripts/', options='')
File "/home/playrix/.local/lib/python2.7/site-packages/autopep8.py", line 3897, in fix_multiple_files
filenames = find_files(filenames, options.recursive, options.exclude)
AttributeError: 'str' object has no attribute 'recursive'