浏览代码

update pre-commit instructions for CONTRIBUTING.md (#5130)

/develop/input-actuator-tanks
GitHub 3 年前
当前提交
db662bf6
共有 1 个文件被更改,包括 9 次插入3 次删除
  1. 12
      com.unity.ml-agents/CONTRIBUTING.md

12
com.unity.ml-agents/CONTRIBUTING.md


Several static checks are run on the codebase using the
[pre-commit framework](https://pre-commit.com/) during CI. To execute the same
checks locally, run `pip install pre-commit` and then `pre-commit run --all-files`.
checks locally, run:
```bash
pip install pre-commit>=2.8.0
pip install identify>==2.1.3
pre-commit run --all-files
```
Some hooks (for example, `black`) will output the corrected version of the code;
others (like `mypy`) may require more effort to fix. You can optionally run
`pre-commit install` to install it as a git hook; after this it will run on all

[`black`](https://github.com/psf/black).
C# code is formatted using [`dotnet-format`](https://github.com/dotnet/format).
You must have [dotnet](https://dotnet.microsoft.com/download) and
`dotnet-format` installed first.
You must have [dotnet](https://dotnet.microsoft.com/download) installed first
(but don't need to install `dotnet-format` - `pre-commit` will do that for you).
### Python type annotations

正在加载...
取消
保存