From 20e21856cfcddf554805b4a190fef4e1d8816f55 Mon Sep 17 00:00:00 2001 From: auxten Date: Fri, 3 Jan 2025 08:09:46 +0000 Subject: [PATCH] Fix flake8 --- .github/workflows/pr_ci.yaml | 2 +- chdb/__init__.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr_ci.yaml b/.github/workflows/pr_ci.yaml index 3cb3928cc08..33e452a7469 100644 --- a/.github/workflows/pr_ci.yaml +++ b/.github/workflows/pr_ci.yaml @@ -27,5 +27,5 @@ jobs: run: python -m pip install flake8 - name: Run flake8 on chdb directory - run: flake8 chdb + run: cd chdb && flake8 . \ No newline at end of file diff --git a/chdb/__init__.py b/chdb/__init__.py index 94f672ecb1c..3afaf371118 100644 --- a/chdb/__init__.py +++ b/chdb/__init__.py @@ -2,6 +2,7 @@ import os import threading + class ChdbError(Exception): """Base class for exceptions in this module.""" @@ -65,9 +66,11 @@ def to_df(r): t = to_arrowTable(r) return t.to_pandas(use_threads=True) + # global connection lock, for multi-threading use of legacy chdb.query() g_conn_lock = threading.Lock() + # wrap _chdb functions def query(sql, output_format="CSV", path="", udf_path=""): global g_udf_path