Skip to content

Commit 1ee6b42

Browse files
committed
Ruff format
1 parent 6de2ab7 commit 1ee6b42

File tree

3 files changed

+22
-10
lines changed

3 files changed

+22
-10
lines changed

duckdb/experimental/spark/sql/types.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -513,12 +513,14 @@ class DayTimeIntervalType(AtomicType):
513513
MINUTE = 2
514514
SECOND = 3
515515

516-
_fields: Mapping[str, int] = MappingProxyType({
517-
DAY: "day",
518-
HOUR: "hour",
519-
MINUTE: "minute",
520-
SECOND: "second",
521-
})
516+
_fields: Mapping[str, int] = MappingProxyType(
517+
{
518+
DAY: "day",
519+
HOUR: "hour",
520+
MINUTE: "minute",
521+
SECOND: "second",
522+
}
523+
)
522524

523525
_inverted_fields: Mapping[int, str] = MappingProxyType(dict(zip(_fields.values(), _fields.keys())))
524526

tests/fast/api/test_duckdb_connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,8 @@ def test_connect_with_path(self, tmp_database):
383383
assert con.sql("select 42").fetchall() == [(42,)]
384384

385385
with pytest.raises(
386-
duckdb.InvalidInputException, match=re.escape("Please provide either a str or a pathlib.Path, not <class 'int'>")
386+
duckdb.InvalidInputException,
387+
match=re.escape("Please provide either a str or a pathlib.Path, not <class 'int'>"),
387388
):
388389
con = duckdb.connect(5)
389390

tests/fast/test_alex_multithread.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ def test_multiple_cursors(self, duckdb_cursor):
4040

4141
# Kick off multiple threads (in the same process)
4242
# Pass in the same connection as an argument, and an object to store the results
43-
threads = [Thread(target=insert_from_cursor, args=(duckdb_con,), name="my_thread_" + str(i)) for i in range(thread_count)]
43+
threads = [
44+
Thread(target=insert_from_cursor, args=(duckdb_con,), name="my_thread_" + str(i))
45+
for i in range(thread_count)
46+
]
4447

4548
for thread in threads:
4649
thread.start()
@@ -88,7 +91,10 @@ def test_multiple_cursors_persisted(self, tmp_database):
8891

8992
# Kick off multiple threads (in the same process)
9093
# Pass in the same connection as an argument, and an object to store the results
91-
threads = [Thread(target=insert_from_cursor, args=(duckdb_con,), name="my_thread_" + str(i)) for i in range(thread_count)]
94+
threads = [
95+
Thread(target=insert_from_cursor, args=(duckdb_con,), name="my_thread_" + str(i))
96+
for i in range(thread_count)
97+
]
9298

9399
for thread in threads:
94100
thread.start()
@@ -111,7 +117,10 @@ def test_same_connection_persisted(self, tmp_database):
111117

112118
# Kick off multiple threads (in the same process)
113119
# Pass in the same connection as an argument, and an object to store the results
114-
threads = [Thread(target=insert_from_same_connection, args=(duckdb_con,), name="my_thread_" + str(i)) for i in range(thread_count)]
120+
threads = [
121+
Thread(target=insert_from_same_connection, args=(duckdb_con,), name="my_thread_" + str(i))
122+
for i in range(thread_count)
123+
]
115124
for thread in threads:
116125
thread.start()
117126

0 commit comments

Comments
 (0)