pyproject.toml中的2个阵列
我正在对pyproject.toml
文件进行镜头,我陷入了这个简单的任务。考虑以下可选依赖性:
[project.optional-dependencies]
style = ["black", "codespell", "isort", "flake8"]
test = ["pytest", "pytest-cov"]
all = ["black", "codespell", "isort", "flake8", "pytest", "pytest-cov"]
是否有一种方法可以避免在all
键中复制/粘贴所有可选dep?至少有一种方法可以做all = style + test
?
I'm giving a shot to the pyproject.toml
file, and I'm stuck on this simple task. Consider the following optional dependencies:
[project.optional-dependencies]
style = ["black", "codespell", "isort", "flake8"]
test = ["pytest", "pytest-cov"]
all = ["black", "codespell", "isort", "flake8", "pytest", "pytest-cov"]
Is there a way to avoid copy/pasting all the optional-dep in the all
key? Is there a way to do all = style + test
at least?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在
但是,有一种棘手的方法可以在Python包装中取决于您自己:
source :
There is no such feature directly in the toml markup.
However, there is a tricky way to do this in Python packaging by depending on yourself:
Source: