feat: add strict mypy type-checking for app/utils/ module
- Add [[tool.mypy.overrides]] section for app/utils/** with disallow_untyped_defs=true - Add type annotations to all functions in app/utils/ (12 files) - Fix type annotations in app/config.py and app/database.py (imported by utils) - All 85 source files now pass mypy type checking Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
@@ -17,7 +17,7 @@ from app.models import ApplicationSettings
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def load_settings_from_db(settings_obj, db_session: Session) -> None:
|
||||
def load_settings_from_db(settings_obj: object, db_session: Session) -> None:
|
||||
"""
|
||||
Load settings from database and apply them to the settings object.
|
||||
|
||||
@@ -111,7 +111,7 @@ def convert_setting_value(value: Optional[str], field_type: Any) -> Any:
|
||||
return str(value)
|
||||
|
||||
|
||||
def reload_settings_from_db(settings_obj) -> bool:
|
||||
def reload_settings_from_db(settings_obj: object) -> bool:
|
||||
"""
|
||||
Reload settings from database.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user