dzi*_*iou 3 python isort pyproject.toml autoflake
我有一系列在本地和 Jenkins 上运行的工具来检查和格式化我的 Python 代码:
我使用pyproject.tomlfile 来配置 black、isort with.isort.cfg和 autoflake 与命令行参数,因为我还没有找到任何支持使用配置文件配置它。
有没有办法配置 isort 和 autoflake pyproject.toml?
我希望所有工具都配置为一个文件。
可以在https://pycqa.github.io/isort/docs/configuration/options/找到 isort 配置
通常,配置参数用下划线分隔。下面的示例将提供使 black 和 isort 兼容的配置,如下所述https://copdips.com/2020/04/making-isort-compatible-with-black.html
[tool.isort]
multi_line_output = 3
line_length = 88
include_trailing_comma = true
[tool.black]
line_length = 88
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3803 次 |
| 最近记录: |