mirror of
https://github.com/sprockets/sprockets-postgres.git
synced 2024-11-14 11:19:27 +00:00
Melt a few flake8 flakes
This commit is contained in:
parent
3d6345a882
commit
230983e803
1 changed files with 22 additions and 22 deletions
|
@ -436,7 +436,7 @@ class ApplicationMixin:
|
||||||
}
|
}
|
||||||
|
|
||||||
def _create_postgres_settings(self) -> dict:
|
def _create_postgres_settings(self) -> dict:
|
||||||
return {
|
return {
|
||||||
'url': self.settings.get(
|
'url': self.settings.get(
|
||||||
'postgres_url', os.environ.get('POSTGRES_URL')),
|
'postgres_url', os.environ.get('POSTGRES_URL')),
|
||||||
'max_pool_size': int(self.settings.get(
|
'max_pool_size': int(self.settings.get(
|
||||||
|
@ -459,27 +459,27 @@ class ApplicationMixin:
|
||||||
os.environ.get(
|
os.environ.get(
|
||||||
'POSTGRES_CONNECTION_TTL',
|
'POSTGRES_CONNECTION_TTL',
|
||||||
DEFAULT_POSTGRES_CONNECTION_TIMEOUT))),
|
DEFAULT_POSTGRES_CONNECTION_TIMEOUT))),
|
||||||
'enable_hstore': self.settings.get(
|
'enable_hstore': self.settings.get(
|
||||||
'postgres_hstore',
|
'postgres_hstore',
|
||||||
util.strtobool(
|
util.strtobool(
|
||||||
os.environ.get(
|
os.environ.get(
|
||||||
'POSTGRES_HSTORE', DEFAULT_POSTGRES_HSTORE))),
|
'POSTGRES_HSTORE', DEFAULT_POSTGRES_HSTORE))),
|
||||||
'enable_json': self.settings.get(
|
'enable_json': self.settings.get(
|
||||||
'postgres_json',
|
'postgres_json',
|
||||||
util.strtobool(
|
util.strtobool(
|
||||||
os.environ.get(
|
os.environ.get(
|
||||||
'POSTGRES_JSON', DEFAULT_POSTGRES_JSON))),
|
'POSTGRES_JSON', DEFAULT_POSTGRES_JSON))),
|
||||||
'enable_uuid': self.settings.get(
|
'enable_uuid': self.settings.get(
|
||||||
'postgres_uuid',
|
'postgres_uuid',
|
||||||
util.strtobool(
|
util.strtobool(
|
||||||
os.environ.get(
|
os.environ.get(
|
||||||
'POSTGRES_UUID', DEFAULT_POSTGRES_UUID))),
|
'POSTGRES_UUID', DEFAULT_POSTGRES_UUID))),
|
||||||
'query_timeout': int(self.settings.get(
|
'query_timeout': int(self.settings.get(
|
||||||
'postgres_query_timeout',
|
'postgres_query_timeout',
|
||||||
os.environ.get(
|
os.environ.get(
|
||||||
'POSTGRES_QUERY_TIMEOUT',
|
'POSTGRES_QUERY_TIMEOUT',
|
||||||
DEFAULT_POSTGRES_QUERY_TIMEOUT))),
|
DEFAULT_POSTGRES_QUERY_TIMEOUT)))
|
||||||
}
|
}
|
||||||
|
|
||||||
async def _postgres_connect(self) -> bool:
|
async def _postgres_connect(self) -> bool:
|
||||||
"""Setup the Postgres pool of connections"""
|
"""Setup the Postgres pool of connections"""
|
||||||
|
|
Loading…
Reference in a new issue