排除名称中有空格的整个目录



我有一个名为"Old stuff"的目录,我希望flake8不要在该目录中整理代码。

排除它的正确语法是什么?

我查看了配置flake8的文档,但没有找到我想要的内容。

我在.flake8文件中进行了尝试:

[flake8]
max-line-length = 99
exclude =
# Don't check the Old directories
# Attempt 1
Old stuff
# Attempt 2
"Old stuff"
# Attempt 3
/Old stuff/
# Attempt 4
./Old stuff/
# Attempt 5
/Old stuff/

这些语法都不起作用。

在命令行上尝试排除时出现相同问题:

flake8 --exclude=Old stuff

要让flake8忽略带有空白的目录,以下语法有效:

[flake8]
max-line-length = 99
exclude =
# Don't check the Old directories
Old*stuff

对于命令行:

flake8 --exclude=Old*stuff

最新更新