mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-24 19:04:12 +02:00
Upgrade to latest Black
This commit is contained in:
parent
ea0de7ec0c
commit
976cf81dc9
2 changed files with 14 additions and 10 deletions
2
setup.py
2
setup.py
|
|
@ -32,7 +32,7 @@ setup(
|
||||||
"pluggy",
|
"pluggy",
|
||||||
],
|
],
|
||||||
extras_require={
|
extras_require={
|
||||||
"test": ["pytest", "black", "hypothesis", "cogapp"],
|
"test": ["pytest", "black>=24.1.1", "hypothesis", "cogapp"],
|
||||||
"docs": [
|
"docs": [
|
||||||
"furo",
|
"furo",
|
||||||
"sphinx-autobuild",
|
"sphinx-autobuild",
|
||||||
|
|
|
||||||
|
|
@ -930,9 +930,9 @@ class Database:
|
||||||
" [{column_name}] {column_type}{column_extras}".format(
|
" [{column_name}] {column_type}{column_extras}".format(
|
||||||
column_name=column_name,
|
column_name=column_name,
|
||||||
column_type=COLUMN_TYPE_MAPPING[column_type],
|
column_type=COLUMN_TYPE_MAPPING[column_type],
|
||||||
column_extras=(" " + " ".join(column_extras))
|
column_extras=(
|
||||||
if column_extras
|
(" " + " ".join(column_extras)) if column_extras else ""
|
||||||
else "",
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
extra_pk = ""
|
extra_pk = ""
|
||||||
|
|
@ -1481,9 +1481,11 @@ class Table(Queryable):
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
return "<Table {}{}>".format(
|
return "<Table {}{}>".format(
|
||||||
self.name,
|
self.name,
|
||||||
" (does not exist yet)"
|
(
|
||||||
if not self.exists()
|
" (does not exist yet)"
|
||||||
else " ({})".format(", ".join(c.name for c in self.columns)),
|
if not self.exists()
|
||||||
|
else " ({})".format(", ".join(c.name for c in self.columns))
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
@ -2940,9 +2942,11 @@ class Table(Queryable):
|
||||||
value = jsonify_if_needed(
|
value = jsonify_if_needed(
|
||||||
record.get(
|
record.get(
|
||||||
key,
|
key,
|
||||||
None
|
(
|
||||||
if key != hash_id
|
None
|
||||||
else hash_record(record, hash_id_columns),
|
if key != hash_id
|
||||||
|
else hash_record(record, hash_id_columns)
|
||||||
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if key in extracts:
|
if key in extracts:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue