Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/__init__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
)
Expand Down
Loading