From 8e95fbafbd5c5c9ed68261c7d95743ea74738c7a Mon Sep 17 00:00:00 2001 From: Marion Giusti Date: Tue, 1 Sep 2026 14:26:39 +0200 Subject: [PATCH 1/2] chore(ruff): use a string default value for DB_PORT --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}" ) From 01333fc839ee5ae2ad0fa1bf6794870167fa3848 Mon Sep 17 00:00:00 2001 From: Marion Giusti Date: Tue, 1 Sep 2026 14:37:47 +0200 Subject: [PATCH 2/2] chore(ruff): annotate mutable class attribute --- app/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {