From 156bd115b7c5f80830f620a0039a275401a14200 Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Fri, 17 Nov 2023 14:29:58 -0600 Subject: [PATCH] chore: Add pre-commit/pygrep-hooks to pre-commit hooks (#2382) * Impliment repo-review PC170: Uses PyGrep hooks (only needed if RST present). - c.f. https://learn.scientific-python.org/development/guides/style/#PC170 --- .pre-commit-config.yaml | 7 +++++++ docs/index.rst | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bcb8d65591..637aa35b22 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,6 +27,13 @@ repos: # exclude generated files exclude: ^validation/|\.dtd$|\.xml$ +- repo: https://github.com/pre-commit/pygrep-hooks + rev: "v1.10.0" + hooks: + - id: rst-backticks + - id: rst-directive-colons + - id: rst-inline-touching-normal + - repo: https://github.com/astral-sh/ruff-pre-commit rev: "v0.1.4" hooks: diff --git a/docs/index.rst b/docs/index.rst index 278abc2447..fbb5bf9925 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,7 +1,7 @@ .. pyhf documentation master file, created by sphinx-quickstart on Fri Feb 9 11:58:49 2018. You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. + contain the root ``toctree`` directive. .. toctree:: :hidden: