diff --git a/app/__init__.py b/app/__init__.py index e5c3e9e..9961ac6 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -1,6 +1,7 @@ import datetime import json import os +from typing import ClassVar from flask import Flask, abort, jsonify, redirect, render_template, session, url_for from flask_migrate import Migrate @@ -30,7 +31,7 @@ class Plan(db.Model): delete_key = db.Column(db.String) password_hash = db.Column(db.String, default=False) - __table_args__ = {"postgresql_partition_by": "HASH (id)"} + __table_args__: ClassVar[dict(str, str)] = {"postgresql_partition_by": "HASH (id)"} def as_dict(self): return { diff --git a/config.py b/config.py index 39978fb..48244eb 100644 --- a/config.py +++ b/config.py @@ -13,7 +13,7 @@ def str_to_bool(value: str | None) -> bool: DB_USER = os.environ.get("DB_USER", "postgres") DB_PASS = os.environ.get("DB_PASS", "postgres") DB_SERVICE = os.environ.get("DB_SERVICE", "0.0.0.0") -DB_PORT = os.environ.get("DB_PORT", 5432) +DB_PORT = os.environ.get("DB_PORT", "5432") SQLALCHEMY_DATABASE_URI = ( f"postgresql://{DB_USER}:{DB_PASS}@{DB_SERVICE}:{DB_PORT}/{DB_NAME}" )