使用project.toml配置isort和autoflake

问题描述 投票:0回答:1

我有一系列在本地和Jenkins上运行的工具,用于检查和格式化我的Python代码:

  • 自动薄片
  • isort
  • 黑色

我使用pyproject.toml文件来配置黑色,使用.isort.cfg进行isort,并使用命令行参数进行自动薄片化,因为我没有找到使用配置文件对其进行配置的任何支持。

是否可以通过pyproject.toml配置isort和autoflake?

我希望所有工具都只配置一个文件。

python isort pyproject.toml autoflake
1个回答
0
投票
您可以将isort配置移至pyproject.toml,但将[settings]更改为[tool.isort]

https://github.com/timothycrosley/isort#configuring-isort

我不相信autoflake支持pyproject.toml配置。欢迎您在其github页面上打开问题。

© www.soinside.com 2019 - 2024. All rights reserved.