style: format backend with black
Also drops the session-sliding comment in login_required.
This commit is contained in:
+4
-1
@@ -1,4 +1,5 @@
|
||||
"""PostgreSQL access: a connection pool, one connection per request, and two query helpers."""
|
||||
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
@@ -11,7 +12,9 @@ SCHEMA = Path(__file__).with_name("schema.sql")
|
||||
|
||||
|
||||
def init_app(app: Flask) -> None:
|
||||
pool = psycopg2.pool.ThreadedConnectionPool(1, 5, os.environ.get("DATABASE_URL", DEFAULT_DATABASE_URL))
|
||||
pool = psycopg2.pool.ThreadedConnectionPool(
|
||||
1, 5, os.environ.get("DATABASE_URL", DEFAULT_DATABASE_URL)
|
||||
)
|
||||
conn = pool.getconn()
|
||||
try:
|
||||
with conn, conn.cursor() as cur:
|
||||
|
||||
Reference in New Issue
Block a user