Skip to content

Commit

Permalink
format with black
Browse files Browse the repository at this point in the history
  • Loading branch information
kigawas committed Aug 28, 2020
1 parent 5e39680 commit 0c3bf03
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'python-gino'
html_theme = "python-gino"

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
Expand Down
2 changes: 1 addition & 1 deletion src/gino/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ async def __aexit__(self, exc_type, exc_val, exc_tb):
"uq": "uq_%(table_name)s_%(column_0_name)s",
"ck": "ck_%(table_name)s_%(constraint_name)s",
"fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s",
"pk": "pk_%(table_name)s"
"pk": "pk_%(table_name)s",
}


Expand Down
6 changes: 3 additions & 3 deletions tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class User(db.Model):
balance = db.IntegerProperty(default=0)
birthday = db.DateTimeProperty(default=lambda i: datetime.utcfromtimestamp(0))
team_id = db.Column(db.ForeignKey("gino_teams.id"))
weight = db.IntegerProperty(prop_name='parameter')
height = db.IntegerProperty(default=170, prop_name='parameter')
bio = db.StringProperty(prop_name='parameter')
weight = db.IntegerProperty(prop_name="parameter")
height = db.IntegerProperty(default=170, prop_name="parameter")
bio = db.StringProperty(prop_name="parameter")

@balance.after_get
def balance(self, val):
Expand Down
24 changes: 12 additions & 12 deletions tests/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,21 +411,21 @@ async def test_repr():
from gino.dialects.asyncpg import NullPool

e = await create_engine(PG_URL, pool_class=NullPool)
assert 'cur=0' in repr(e)
assert "cur=0" in repr(e)
async with e.acquire():
assert 'cur=1' in repr(e)
assert "cur=1" in repr(e)
async with e.acquire():
assert 'cur=2' in repr(e)
assert 'cur=1' in repr(e)
assert 'cur=0' in repr(e)
assert 'NullPool' in e.repr(color=True)
assert "cur=2" in repr(e)
assert "cur=1" in repr(e)
assert "cur=0" in repr(e)
assert "NullPool" in e.repr(color=True)

e = await create_engine(PG_URL)
assert 'cur=10 use=0' in repr(e)
assert "cur=10 use=0" in repr(e)
async with e.acquire():
assert 'cur=10 use=1' in repr(e)
assert "cur=10 use=1" in repr(e)
async with e.acquire():
assert 'cur=10 use=2' in repr(e)
assert 'cur=10 use=1' in repr(e)
assert 'cur=10 use=0' in repr(e)
assert 'asyncpg.pool.Pool' in e.repr(color=True)
assert "cur=10 use=2" in repr(e)
assert "cur=10 use=1" in repr(e)
assert "cur=10 use=0" in repr(e)
assert "asyncpg.pool.Pool" in e.repr(color=True)

0 comments on commit 0c3bf03

Please sign in to comment.