简体   繁体   English

如何仅针对未提交的更改运行 Pylama (git)

[英]How to run Pylama only for uncommitted changes (git)

我一直在寻找仅针对未提交的更改而不是我的整个项目运行 python linter,有没有办法仅针对 git 更改运行 Pylama。

You can provide a list of the uncommitted changes to Pylama as a parameter.您可以将未提交的更改列表作为参数提供给 Pylama。

Run from the command line:从命令行运行:

pylama "$(git --no-pager diff --name-only)"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM