From 84500b18437daa0e3a07c9d8a62ba24269da0b7d Mon Sep 17 00:00:00 2001 From: ptiurin Date: Thu, 23 Feb 2023 09:16:46 +0100 Subject: [PATCH 1/5] ci: Fix escaping keywords --- tests/integration/dbapi/conftest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/integration/dbapi/conftest.py b/tests/integration/dbapi/conftest.py index de64bd374d..e83cb70414 100644 --- a/tests/integration/dbapi/conftest.py +++ b/tests/integration/dbapi/conftest.py @@ -67,15 +67,15 @@ def all_types_query() -> str: "'text' as \"string\", " "CAST('2021-03-28' AS DATE) as \"date\", " "CAST('1860-03-04' AS DATE_EXT) as \"date32\"," - "pgdate '0001-01-01' as pgdate, " + "pgdate '0001-01-01' as \"pgdate\", " "CAST('2019-07-31 01:01:01' AS DATETIME) as \"datetime\", " "CAST('2019-07-31 01:01:01.1234' AS TIMESTAMP_EXT(4)) as \"datetime64\", " - "CAST('1111-01-05 17:04:42.123456' as timestampntz) as timestampntz, " - "'1111-01-05 17:04:42.123456'::timestamptz as timestamptz, " + "CAST('1111-01-05 17:04:42.123456' as timestampntz) as \"timestampntz\", " + "'1111-01-05 17:04:42.123456'::timestamptz as \"timestamptz\", " 'true as "boolean", ' "[1,2,3,4] as \"array\", cast('1231232.123459999990457054844258706536' as " 'decimal(38,30)) as "decimal", ' - "cast(null as int) as nullable" + "cast(null as int) as \"nullable\"" ) From 3eb0b1148694089cd7f5cd4f98ba5b63cc794be4 Mon Sep 17 00:00:00 2001 From: ptiurin Date: Thu, 23 Feb 2023 10:38:53 +0100 Subject: [PATCH 2/5] System engine allowed commands fix --- tests/integration/dbapi/sync/test_system_engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/dbapi/sync/test_system_engine.py b/tests/integration/dbapi/sync/test_system_engine.py index 3713cc5dfd..2474c323df 100644 --- a/tests/integration/dbapi/sync/test_system_engine.py +++ b/tests/integration/dbapi/sync/test_system_engine.py @@ -68,7 +68,7 @@ def db_specs(region, attached_engine): @mark.parametrize( "query", - ["CREATE DIMENSION TABLE dummy(id INT)", "SHOW TABLES", "SHOW INDEXES"], + ["CREATE DIMENSION TABLE dummy(id INT)"], ) def test_query_errors(connection_system_engine, query): with connection_system_engine.cursor() as cursor: From e14a9b528ce7ab7d77f15384de98b41f7d136d40 Mon Sep 17 00:00:00 2001 From: ptiurin Date: Thu, 23 Feb 2023 12:16:17 +0100 Subject: [PATCH 3/5] ci: Fix pre-commit --- .github/workflows/code-check.yml | 4 ++-- .pre-commit-config.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/code-check.yml b/.github/workflows/code-check.yml index 6829c471da..e6d6f614a0 100644 --- a/.github/workflows/code-check.yml +++ b/.github/workflows/code-check.yml @@ -12,10 +12,10 @@ jobs: - name: Check out code uses: actions/checkout@v2 - - name: Set up Python 3.7 + - name: Set up Python 3.8 uses: actions/setup-python@v2 with: - python-version: 3.7 + python-version: 3.8 - name: Install dependencies run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cbc6a4b4c3..c2f0e78459 100755 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: - --remove-unused-variables - repo: https://github.com/PyCQA/isort - rev: 5.9.3 + rev: "5.12.0" hooks: - id: isort @@ -39,7 +39,7 @@ repos: - id: black_nbconvert - repo: https://github.com/PyCQA/flake8 - rev: 3.7.9 + rev: "4.0.1" hooks: - id: flake8 additional_dependencies: From b68cd46ff4fe28b0cfd1c62db02f8b67b3c579c8 Mon Sep 17 00:00:00 2001 From: ptiurin Date: Thu, 23 Feb 2023 12:20:52 +0100 Subject: [PATCH 4/5] fix formatting --- tests/integration/dbapi/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/dbapi/conftest.py b/tests/integration/dbapi/conftest.py index e83cb70414..657449e40d 100644 --- a/tests/integration/dbapi/conftest.py +++ b/tests/integration/dbapi/conftest.py @@ -75,7 +75,7 @@ def all_types_query() -> str: 'true as "boolean", ' "[1,2,3,4] as \"array\", cast('1231232.123459999990457054844258706536' as " 'decimal(38,30)) as "decimal", ' - "cast(null as int) as \"nullable\"" + 'cast(null as int) as "nullable"' ) From ba44b846bae62af8087390887a1db9c08c57fd37 Mon Sep 17 00:00:00 2001 From: ptiurin Date: Thu, 23 Feb 2023 12:27:11 +0100 Subject: [PATCH 5/5] fix --- src/firebolt/async_db/cursor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/firebolt/async_db/cursor.py b/src/firebolt/async_db/cursor.py index 4afef13242..fbda088607 100644 --- a/src/firebolt/async_db/cursor.py +++ b/src/firebolt/async_db/cursor.py @@ -656,7 +656,7 @@ async def get_status(self, query_id: str) -> QueryStatus: resp_json = resp.json() if "status" not in resp_json: raise OperationalError( - f"Invalid response to asynchronous query: missing status." + "Invalid response to asynchronous query: missing status." ) except Exception: self._state = CursorState.ERROR