This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 3ed5b7ad3e Cover wider set of excluded tests for re2 check (#32424)
3ed5b7ad3e is described below

commit 3ed5b7ad3e9144b11563bea74c8d619b33ba1c6c
Author: Jarek Potiuk <[email protected]>
AuthorDate: Fri Jul 7 13:54:47 2023 +0200

    Cover wider set of excluded tests for re2 check (#32424)
    
    We are adding more tests following *_test folder convention (for
    example helm_tests) and re2 check should exclude all of those.
---
 .pre-commit-config.yaml | 4 ++--
 STATIC_CODE_CHECKS.rst  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index afac835f2b..15e1399a0c 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -931,12 +931,12 @@ repos:
         files: ^tests/.*\.py$
       - id: check-usage-of-re2-over-re
         language: pygrep
-        name: Use re2 over re
+        name: Use re2 module instead of re
         description: Use re2 module instead of re
         entry: "^\\s*from re\\s|^\\s*import re\\s"
         pass_filenames: true
         files: \.py$
-        exclude: 
^airflow/providers|^dev/.*\.py$|^scripts/.*\.py$|^tests/|^docker_tests/|^docs/.*\.py$|^airflow/utils/helpers.py$
+        exclude: 
^airflow/providers|^dev/.*\.py$|^scripts/.*\.py$|^tests/|^\w+_tests/|^docs/.*\.py$|^airflow/utils/helpers.py$
       - id: check-deferrable-default-value
         name: Check default value of deferrable attribute
         language: python
diff --git a/STATIC_CODE_CHECKS.rst b/STATIC_CODE_CHECKS.rst
index a9ec8c106a..4bcba4bb55 100644
--- a/STATIC_CODE_CHECKS.rst
+++ b/STATIC_CODE_CHECKS.rst
@@ -237,7 +237,7 @@ require Breeze Docker image to be built locally.
 
+-----------------------------------------------------------+--------------------------------------------------------------+---------+
 | check-urlparse-usage-in-code                              | Don't use 
urlparse in code                                   |         |
 
+-----------------------------------------------------------+--------------------------------------------------------------+---------+
-| check-usage-of-re2-over-re                                | Use re2 over re  
                                            |         |
+| check-usage-of-re2-over-re                                | Use re2 module 
instead of re                                 |         |
 
+-----------------------------------------------------------+--------------------------------------------------------------+---------+
 | check-xml                                                 | Check XML files 
with xmllint                                 |         |
 
+-----------------------------------------------------------+--------------------------------------------------------------+---------+

Reply via email to