From 7ef7d7aecc8f0950d1bf003a963599b01f4aad92 Mon Sep 17 00:00:00 2001 From: Jon Meow Date: Mon, 9 May 2022 13:23:33 -0700 Subject: [PATCH] Fix pre-commit scoping of proposals/scripts, comment exclusions (#1238) --- .pre-commit-config.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29ab50bc49a1..8fe4a9106579 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -106,9 +106,14 @@ repos: additional_dependencies: - gql >= 2.0.0, < 3.0.0 - PyGitHub + # Exclusions are: + # - p#### scripts because they're not tested or maintained. + # - lit.cfg.py because it has multiple copies, breaking mypy. + # - Unit tests because they sometimes violate typing, such as by + # assigning a mock to a function. exclude: | (?x)^( - proposals/.*| + proposals/(?!scripts/).*| .*/lit\.cfg\.py| .*_test\.py )$