Skip to content

Commit

Permalink
Upgrade to latest Black
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jan 31, 2024
1 parent b7def00 commit ff57a97
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_long_description():
"pluggy",
],
extras_require={
"test": ["pytest", "black", "hypothesis", "cogapp"],
"test": ["pytest", "black>=24.1.1", "hypothesis", "cogapp"],
"docs": [
"furo",
"sphinx-autobuild",
Expand Down
22 changes: 13 additions & 9 deletions sqlite_utils/db.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,9 +930,9 @@ def sort_key(p):
" [{column_name}] {column_type}{column_extras}".format(
column_name=column_name,
column_type=COLUMN_TYPE_MAPPING[column_type],
column_extras=(" " + " ".join(column_extras))
if column_extras
else "",
column_extras=(
(" " + " ".join(column_extras)) if column_extras else ""
),
)
)
extra_pk = ""
Expand Down Expand Up @@ -1481,9 +1481,11 @@ def __init__(
def __repr__(self) -> str:
return "<Table {}{}>".format(
self.name,
" (does not exist yet)"
if not self.exists()
else " ({})".format(", ".join(c.name for c in self.columns)),
(
" (does not exist yet)"
if not self.exists()
else " ({})".format(", ".join(c.name for c in self.columns))
),
)

@property
Expand Down Expand Up @@ -2940,9 +2942,11 @@ def build_insert_queries_and_params(
value = jsonify_if_needed(
record.get(
key,
None
if key != hash_id
else hash_record(record, hash_id_columns),
(
None
if key != hash_id
else hash_record(record, hash_id_columns)
),
)
)
if key in extracts:
Expand Down

0 comments on commit ff57a97

Please sign in to comment.