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

raulcd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new ae3825f18 chore: update all pre-commit hooks (#1787)
ae3825f18 is described below

commit ae3825f18bc6d4150305270596d4ebf913ddea1f
Author: David Li <[email protected]>
AuthorDate: Mon Apr 29 21:46:07 2024 +0900

    chore: update all pre-commit hooks (#1787)
    
    Fixes #1678.
---
 .github/workflows/integration.yml                          |  6 ++++--
 .github/workflows/native-unix.yml                          |  3 ++-
 .pre-commit-config.yaml                                    | 14 +++++++-------
 c/validation/adbc_validation_util.h                        |  8 ++------
 python/adbc_driver_manager/adbc_driver_manager/dbapi.py    |  3 +--
 python/adbc_driver_manager/tests/test_lowlevel.py          |  2 +-
 python/adbc_driver_postgresql/benchmarks/benchmarks.py     |  3 +--
 .../adbc_driver_snowflake/__init__.py                      |  6 +++---
 8 files changed, 21 insertions(+), 24 deletions(-)

diff --git a/.github/workflows/integration.yml 
b/.github/workflows/integration.yml
index 1a0c6f858..784b535ed 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -150,7 +150,8 @@ jobs:
         shell: bash -l {0}
         run: |
           docker compose up --detach flightsql-test flightsql-sqlite-test 
dremio dremio-init
-          cat .env | grep -v -e '^#' | awk NF | tee -a $GITHUB_ENV
+          pip install python-dotenv[cli]
+          python -m dotenv -f .env list --format simple | tee -a $GITHUB_ENV
 
       - name: Build FlightSQL Driver
         shell: bash -l {0}
@@ -229,7 +230,8 @@ jobs:
       - name: Configure Integration Env Vars
         shell: bash -l {0}
         run: |
-          cat .env | grep -v -e '^#' | awk NF | tee -a $GITHUB_ENV
+          pip install python-dotenv[cli]
+          python -m dotenv -f .env list --format simple | tee -a $GITHUB_ENV
           echo "ADBC_USE_ASAN=ON" >> $GITHUB_ENV
           echo "ADBC_USE_UBSAN=ON" >> $GITHUB_ENV
 
diff --git a/.github/workflows/native-unix.yml 
b/.github/workflows/native-unix.yml
index 217777581..c3f54cf54 100644
--- a/.github/workflows/native-unix.yml
+++ b/.github/workflows/native-unix.yml
@@ -636,7 +636,8 @@ jobs:
       - name: Configure Integration Env Vars
         shell: bash -l {0}
         run: |
-          cat .env | grep -v -e '^#' | awk NF | tee -a $GITHUB_ENV
+          pip install python-dotenv[cli]
+          python -m dotenv -f .env list --format simple | tee -a $GITHUB_ENV
       - name: Test Recipes (C++)
         shell: bash -l {0}
         run: |
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 5be4d0f4d..2b726f1b4 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -22,7 +22,7 @@
 
 repos:
   - repo: https://github.com/pre-commit/pre-commit-hooks
-    rev: v2.3.0
+    rev: v4.6.0
     hooks:
     - id: check-xml
     - id: check-yaml
@@ -40,7 +40,7 @@ repos:
     - id: trailing-whitespace
       exclude: "^r/.*?/_snaps/.*?.md$"
   - repo: https://github.com/pre-commit/mirrors-clang-format
-    rev: "v14.0.6"
+    rev: "v18.1.4"
     hooks:
       - id: clang-format
         types_or: [c, c++]
@@ -59,30 +59,30 @@ repos:
         - "--linelength=90"
         - "--verbose=2"
   - repo: https://github.com/golangci/golangci-lint
-    rev: v1.57.1
+    rev: v1.57.2
     hooks:
     - id: golangci-lint
       entry: bash -c 'cd go/adbc && golangci-lint run --fix --timeout 5m'
       types_or: [go]
   - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
-    rev: v2.12.0
+    rev: v2.13.0
     hooks:
     - id: pretty-format-golang
     - id: pretty-format-java
       args: [--autofix]
       types_or: [java]
   - repo: https://github.com/psf/black
-    rev: 22.3.0
+    rev: 24.4.2
     hooks:
     - id: black
       types_or: [pyi, python]
   - repo: https://github.com/PyCQA/flake8
-    rev: 4.0.1
+    rev: 7.0.0
     hooks:
     - id: flake8
       types_or: [python]
   - repo: https://github.com/PyCQA/isort
-    rev: 5.12.0
+    rev: 5.13.2
     hooks:
     - id: isort
       types_or: [python]
diff --git a/c/validation/adbc_validation_util.h 
b/c/validation/adbc_validation_util.h
index e5ad99624..683103e17 100644
--- a/c/validation/adbc_validation_util.h
+++ b/c/validation/adbc_validation_util.h
@@ -232,12 +232,8 @@ struct GetObjectsReader {
   }
   ~GetObjectsReader() { AdbcGetObjectsDataDelete(get_objects_data_); }
 
-  struct AdbcGetObjectsData* operator*() {
-    return get_objects_data_;
-  }
-  struct AdbcGetObjectsData* operator->() {
-    return get_objects_data_;
-  }
+  struct AdbcGetObjectsData* operator*() { return get_objects_data_; }
+  struct AdbcGetObjectsData* operator->() { return get_objects_data_; }
 
  private:
   struct AdbcGetObjectsData* get_objects_data_;
diff --git a/python/adbc_driver_manager/adbc_driver_manager/dbapi.py 
b/python/adbc_driver_manager/adbc_driver_manager/dbapi.py
index 4c17bb6e7..fea644514 100644
--- a/python/adbc_driver_manager/adbc_driver_manager/dbapi.py
+++ b/python/adbc_driver_manager/adbc_driver_manager/dbapi.py
@@ -235,8 +235,7 @@ class _Closeable(abc.ABC):
         self.close()
 
     @abc.abstractmethod
-    def close(self) -> None:
-        ...
+    def close(self) -> None: ...
 
 
 class _SharedDatabase(_Closeable):
diff --git a/python/adbc_driver_manager/tests/test_lowlevel.py 
b/python/adbc_driver_manager/tests/test_lowlevel.py
index f94c90415..d2940aef1 100644
--- a/python/adbc_driver_manager/tests/test_lowlevel.py
+++ b/python/adbc_driver_manager/tests/test_lowlevel.py
@@ -80,7 +80,7 @@ def test_error_mapping():
     ]
 
     message = "Message"
-    for (klass, code) in cases:
+    for klass, code in cases:
         with pytest.raises(klass) as exc_info:
             _lib._test_error(code, message, vendor_code=None, sqlstate=None)
         assert message in exc_info.value.args[0]
diff --git a/python/adbc_driver_postgresql/benchmarks/benchmarks.py 
b/python/adbc_driver_postgresql/benchmarks/benchmarks.py
index 037bb3004..4d9a4bf4c 100644
--- a/python/adbc_driver_postgresql/benchmarks/benchmarks.py
+++ b/python/adbc_driver_postgresql/benchmarks/benchmarks.py
@@ -60,8 +60,7 @@ class BenchmarkBase(abc.ABC):
         self.sqlalchemy_connection.close()
 
     @abc.abstractmethod
-    def _make_table_name(self, *args, **kwargs) -> str:
-        ...
+    def _make_table_name(self, *args, **kwargs) -> str: ...
 
     def time_pandas_adbc(self, row_count: int, data_type: str) -> None:
         with self.conn.cursor() as cursor:
diff --git a/python/adbc_driver_snowflake/adbc_driver_snowflake/__init__.py 
b/python/adbc_driver_snowflake/adbc_driver_snowflake/__init__.py
index 1b8e3b56f..b939c0b24 100644
--- a/python/adbc_driver_snowflake/adbc_driver_snowflake/__init__.py
+++ b/python/adbc_driver_snowflake/adbc_driver_snowflake/__init__.py
@@ -132,9 +132,9 @@ def connect(
     if uri is not None:
         kwargs["uri"] = uri
     appname = kwargs.get(DatabaseOptions.APPLICATION_NAME.value, "")
-    kwargs[
-        DatabaseOptions.APPLICATION_NAME.value
-    ] = f"[ADBC][Python-{__version__}]{appname}"
+    kwargs[DatabaseOptions.APPLICATION_NAME.value] = (
+        f"[ADBC][Python-{__version__}]{appname}"
+    )
     return adbc_driver_manager.AdbcDatabase(driver=_driver_path(), **kwargs)
 
 

Reply via email to