Skip to content

Commit e92718d

Browse files
committed
Ruff format
1 parent 0088815 commit e92718d

14 files changed

+57
-48
lines changed

scripts/generate_import_cache_cpp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import os
21
import json
2+
import os
33

44
script_dir = os.path.dirname(__file__)
55

scripts/generate_import_cache_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import os
21
import json
2+
import os
33
from typing import Union
44

55
script_dir = os.path.dirname(__file__)

tests/fast/adbc/test_adbc.py

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -133,11 +133,14 @@ def test_commit(tmp_path):
133133
cur.adbc_ingest("ingest", table, "create")
134134

135135
# This now works because we enabled autocommit
136-
with adbc_driver_manager.connect(
137-
driver=driver_path,
138-
entrypoint="duckdb_adbc_init",
139-
db_kwargs=db_kwargs,
140-
) as conn, conn.cursor() as cur:
136+
with (
137+
adbc_driver_manager.connect(
138+
driver=driver_path,
139+
entrypoint="duckdb_adbc_init",
140+
db_kwargs=db_kwargs,
141+
) as conn,
142+
conn.cursor() as cur,
143+
):
141144
cur.execute("SELECT count(*) from ingest")
142145
assert cur.fetch_arrow_table().to_pydict() == {"count_star()": [4]}
143146

@@ -302,12 +305,15 @@ def test_large_chunk(tmp_path):
302305
if os.path.exists(db):
303306
os.remove(db)
304307
db_kwargs = {"path": f"{db}"}
305-
with adbc_driver_manager.connect(
306-
driver=driver_path,
307-
entrypoint="duckdb_adbc_init",
308-
db_kwargs=db_kwargs,
309-
autocommit=True,
310-
) as conn, conn.cursor() as cur:
308+
with (
309+
adbc_driver_manager.connect(
310+
driver=driver_path,
311+
entrypoint="duckdb_adbc_init",
312+
db_kwargs=db_kwargs,
313+
autocommit=True,
314+
) as conn,
315+
conn.cursor() as cur,
316+
):
311317
cur.adbc_ingest("ingest", table, "create")
312318
cur.execute("SELECT count(*) from ingest")
313319
assert cur.fetch_arrow_table().to_pydict() == {"count_star()": [30_000]}
@@ -325,12 +331,15 @@ def test_dictionary_data(tmp_path):
325331
if os.path.exists(db):
326332
os.remove(db)
327333
db_kwargs = {"path": f"{db}"}
328-
with adbc_driver_manager.connect(
329-
driver=driver_path,
330-
entrypoint="duckdb_adbc_init",
331-
db_kwargs=db_kwargs,
332-
autocommit=True,
333-
) as conn, conn.cursor() as cur:
334+
with (
335+
adbc_driver_manager.connect(
336+
driver=driver_path,
337+
entrypoint="duckdb_adbc_init",
338+
db_kwargs=db_kwargs,
339+
autocommit=True,
340+
) as conn,
341+
conn.cursor() as cur,
342+
):
334343
cur.adbc_ingest("ingest", table, "create")
335344
cur.execute("from ingest")
336345
assert cur.fetch_arrow_table().to_pydict() == {
@@ -350,12 +359,15 @@ def test_ree_data(tmp_path):
350359
if os.path.exists(db):
351360
os.remove(db)
352361
db_kwargs = {"path": f"{db}"}
353-
with adbc_driver_manager.connect(
354-
driver=driver_path,
355-
entrypoint="duckdb_adbc_init",
356-
db_kwargs=db_kwargs,
357-
autocommit=True,
358-
) as conn, conn.cursor() as cur:
362+
with (
363+
adbc_driver_manager.connect(
364+
driver=driver_path,
365+
entrypoint="duckdb_adbc_init",
366+
db_kwargs=db_kwargs,
367+
autocommit=True,
368+
) as conn,
369+
conn.cursor() as cur,
370+
):
359371
cur.adbc_ingest("ingest", table, "create")
360372
cur.execute("from ingest")
361373
assert cur.fetch_arrow_table().to_pydict() == {

tests/fast/api/test_native_tz.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
import os
33

44
import pytest
5+
from packaging.version import Version
56

67
import duckdb
7-
from packaging.version import Version
88

99
pd = pytest.importorskip("pandas")
1010
pa = pytest.importorskip("pyarrow")

tests/fast/arrow/test_14344.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import pytest
21
import hashlib
32

3+
import pytest
4+
45
pa = pytest.importorskip("pyarrow")
56

67

tests/fast/arrow/test_9443.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
import pytest
2-
31
from datetime import time
42
from pathlib import PurePosixPath
53

4+
import pytest
5+
66
pq = pytest.importorskip("pyarrow.parquet")
77
pa = pytest.importorskip("pyarrow")
88

9+
910
class Test9443:
1011
def test_9443(self, tmp_path, duckdb_cursor):
1112
arrow_table = pa.Table.from_pylist(

tests/fast/arrow/test_buffer_size_option.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import pytest
22

33
import duckdb
4-
54
from duckdb.typing import VARCHAR
65

76
pa = pytest.importorskip("pyarrow")
87

8+
99
class TestArrowBufferSize:
1010
def test_arrow_buffer_size(self):
1111
con = duckdb.connect()

tests/fast/arrow/test_dictionary_arrow.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import pytest
21
import datetime
32

3+
import pytest
4+
45
pa = pytest.importorskip("pyarrow")
56
pq = pytest.importorskip("pyarrow.parquet")
67
ds = pytest.importorskip("pyarrow.dataset")

tests/fast/pandas/test_copy_on_write.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import datetime
2+
23
import pytest
34

45
import duckdb

tests/fast/pandas/test_fetch_nested.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
import pytest
21
import numpy as np
2+
import pytest
3+
34
import duckdb
45

56
pd = pytest.importorskip("pandas")

0 commit comments

Comments
 (0)