Skip to content

Commit ff57a97

Browse files
committed
Upgrade to latest Black
1 parent b7def00 commit ff57a97

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def get_long_description():
3232
"pluggy",
3333
],
3434
extras_require={
35-
"test": ["pytest", "black", "hypothesis", "cogapp"],
35+
"test": ["pytest", "black>=24.1.1", "hypothesis", "cogapp"],
3636
"docs": [
3737
"furo",
3838
"sphinx-autobuild",

sqlite_utils/db.py

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -930,9 +930,9 @@ def sort_key(p):
930930
" [{column_name}] {column_type}{column_extras}".format(
931931
column_name=column_name,
932932
column_type=COLUMN_TYPE_MAPPING[column_type],
933-
column_extras=(" " + " ".join(column_extras))
934-
if column_extras
935-
else "",
933+
column_extras=(
934+
(" " + " ".join(column_extras)) if column_extras else ""
935+
),
936936
)
937937
)
938938
extra_pk = ""
@@ -1481,9 +1481,11 @@ def __init__(
14811481
def __repr__(self) -> str:
14821482
return "<Table {}{}>".format(
14831483
self.name,
1484-
" (does not exist yet)"
1485-
if not self.exists()
1486-
else " ({})".format(", ".join(c.name for c in self.columns)),
1484+
(
1485+
" (does not exist yet)"
1486+
if not self.exists()
1487+
else " ({})".format(", ".join(c.name for c in self.columns))
1488+
),
14871489
)
14881490

14891491
@property
@@ -2940,9 +2942,11 @@ def build_insert_queries_and_params(
29402942
value = jsonify_if_needed(
29412943
record.get(
29422944
key,
2943-
None
2944-
if key != hash_id
2945-
else hash_record(record, hash_id_columns),
2945+
(
2946+
None
2947+
if key != hash_id
2948+
else hash_record(record, hash_id_columns)
2949+
),
29462950
)
29472951
)
29482952
if key in extracts:

0 commit comments

Comments
 (0)