Skip to content

Commit

Permalink
Melt a few flake8 flakes
Browse files Browse the repository at this point in the history
  • Loading branch information
gmr committed Jan 8, 2021
1 parent 3d6345a commit 230983e
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions sprockets_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def on_error(metric_name, exc) -> None:
}

def _create_postgres_settings(self) -> dict:
return {
return {
'url': self.settings.get(
'postgres_url', os.environ.get('POSTGRES_URL')),
'max_pool_size': int(self.settings.get(
Expand All @@ -459,27 +459,27 @@ def _create_postgres_settings(self) -> dict:
os.environ.get(
'POSTGRES_CONNECTION_TTL',
DEFAULT_POSTGRES_CONNECTION_TIMEOUT))),
'enable_hstore': self.settings.get(
'postgres_hstore',
util.strtobool(
os.environ.get(
'POSTGRES_HSTORE', DEFAULT_POSTGRES_HSTORE))),
'enable_json': self.settings.get(
'postgres_json',
util.strtobool(
os.environ.get(
'POSTGRES_JSON', DEFAULT_POSTGRES_JSON))),
'enable_uuid': self.settings.get(
'postgres_uuid',
util.strtobool(
os.environ.get(
'POSTGRES_UUID', DEFAULT_POSTGRES_UUID))),
'query_timeout': int(self.settings.get(
'postgres_query_timeout',
os.environ.get(
'POSTGRES_QUERY_TIMEOUT',
DEFAULT_POSTGRES_QUERY_TIMEOUT))),
}
'enable_hstore': self.settings.get(
'postgres_hstore',
util.strtobool(
os.environ.get(
'POSTGRES_HSTORE', DEFAULT_POSTGRES_HSTORE))),
'enable_json': self.settings.get(
'postgres_json',
util.strtobool(
os.environ.get(
'POSTGRES_JSON', DEFAULT_POSTGRES_JSON))),
'enable_uuid': self.settings.get(
'postgres_uuid',
util.strtobool(
os.environ.get(
'POSTGRES_UUID', DEFAULT_POSTGRES_UUID))),
'query_timeout': int(self.settings.get(
'postgres_query_timeout',
os.environ.get(
'POSTGRES_QUERY_TIMEOUT',
DEFAULT_POSTGRES_QUERY_TIMEOUT)))
}

async def _postgres_connect(self) -> bool:
"""Setup the Postgres pool of connections"""
Expand Down

0 comments on commit 230983e

Please sign in to comment.