Skip to content

Commit 0c3bf03

Browse files
committed
format with black
1 parent 5e39680 commit 0c3bf03

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
# The theme to use for HTML and HTML Help pages. See the documentation for
5252
# a list of builtin themes.
5353
#
54-
html_theme = 'python-gino'
54+
html_theme = "python-gino"
5555

5656
# Add any paths that contain custom static files (such as style sheets) here,
5757
# relative to this directory. They are copied after the builtin static files,

src/gino/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ async def __aexit__(self, exc_type, exc_val, exc_tb):
215215
"uq": "uq_%(table_name)s_%(column_0_name)s",
216216
"ck": "ck_%(table_name)s_%(constraint_name)s",
217217
"fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s",
218-
"pk": "pk_%(table_name)s"
218+
"pk": "pk_%(table_name)s",
219219
}
220220

221221

tests/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ class User(db.Model):
4949
balance = db.IntegerProperty(default=0)
5050
birthday = db.DateTimeProperty(default=lambda i: datetime.utcfromtimestamp(0))
5151
team_id = db.Column(db.ForeignKey("gino_teams.id"))
52-
weight = db.IntegerProperty(prop_name='parameter')
53-
height = db.IntegerProperty(default=170, prop_name='parameter')
54-
bio = db.StringProperty(prop_name='parameter')
52+
weight = db.IntegerProperty(prop_name="parameter")
53+
height = db.IntegerProperty(default=170, prop_name="parameter")
54+
bio = db.StringProperty(prop_name="parameter")
5555

5656
@balance.after_get
5757
def balance(self, val):

tests/test_engine.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -411,21 +411,21 @@ async def test_repr():
411411
from gino.dialects.asyncpg import NullPool
412412

413413
e = await create_engine(PG_URL, pool_class=NullPool)
414-
assert 'cur=0' in repr(e)
414+
assert "cur=0" in repr(e)
415415
async with e.acquire():
416-
assert 'cur=1' in repr(e)
416+
assert "cur=1" in repr(e)
417417
async with e.acquire():
418-
assert 'cur=2' in repr(e)
419-
assert 'cur=1' in repr(e)
420-
assert 'cur=0' in repr(e)
421-
assert 'NullPool' in e.repr(color=True)
418+
assert "cur=2" in repr(e)
419+
assert "cur=1" in repr(e)
420+
assert "cur=0" in repr(e)
421+
assert "NullPool" in e.repr(color=True)
422422

423423
e = await create_engine(PG_URL)
424-
assert 'cur=10 use=0' in repr(e)
424+
assert "cur=10 use=0" in repr(e)
425425
async with e.acquire():
426-
assert 'cur=10 use=1' in repr(e)
426+
assert "cur=10 use=1" in repr(e)
427427
async with e.acquire():
428-
assert 'cur=10 use=2' in repr(e)
429-
assert 'cur=10 use=1' in repr(e)
430-
assert 'cur=10 use=0' in repr(e)
431-
assert 'asyncpg.pool.Pool' in e.repr(color=True)
428+
assert "cur=10 use=2" in repr(e)
429+
assert "cur=10 use=1" in repr(e)
430+
assert "cur=10 use=0" in repr(e)
431+
assert "asyncpg.pool.Pool" in e.repr(color=True)

0 commit comments

Comments
 (0)