Skip to content

Commit

Permalink
docs: pull Python check parts out of PGH (#261)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Aug 10, 2023
1 parent 64d8959 commit fde06e6
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions docs/pages/guides/style.md
Original file line number Diff line number Diff line change
Expand Up @@ -651,17 +651,13 @@ corrections if you have a lot of them when first adding the check.
{% rr PC170 %} This is a repository with a
[collection of pre-commit extra hooks](https://github.com/pre-commit/pygrep-hooks)
that protect against some common, easy to detect, mistakes. You can pick and
choose the hooks you want from the repo; here are some common ones:
choose the hooks you want from the repo; here are some common ones for
Restructured Text:

```yaml
- repo: https://github.com/pre-commit/pygrep-hooks
rev: "v1.10.0"
hooks:
- id: python-check-blanket-noqa
- id: python-check-blanket-type-ignore
- id: python-no-log-warn
- id: python-no-eval
- id: python-use-type-annotations
- id: rst-backticks
- id: rst-directive-colons
- id: rst-inline-touching-normal
Expand All @@ -676,7 +672,18 @@ called `mypy_error_report.txt`, then run `pipx run mypy_clean_slate -a`.

[codespell]: https://github.com/codespell-project/codespell

Note that if you are using Ruff, you don't need the `python-*` hooks above.
{: .note }

> Note that if you are not using Ruff's "PGH" code, there are `python-*` hooks
> also:
>
> ```yaml
> - id: python-check-blanket-noqa
> - id: python-check-blanket-type-ignore
> - id: python-no-log-warn
> - id: python-no-eval
> - id: python-use-type-annotations
> ```

## Clang-format (C++ only)

Expand Down

0 comments on commit fde06e6

Please sign in to comment.