refactor: code consistency and best practices

- add type hints to error handlers in app/__init__.py
- add docstrings to nested callback functions
- remove deprecated X-XSS-Protection header (superseded by CSP)
- fix typo in cleanup log message (entr(ies) -> entries)
- standardize loop variable naming in fpaste CLI
- update test for intentional header removal
This commit is contained in:
Username
2025-12-22 00:25:18 +01:00
parent 028367d803
commit 680b068c00
4 changed files with 30 additions and 22 deletions

View File

@@ -59,7 +59,7 @@ def run_scheduled_cleanup():
count = cleanup_rate_limits()
if count > 0:
current_app.logger.info(f"Cleaned up {count} rate limit entr(ies)")
current_app.logger.info(f"Cleaned up {count} rate limit entries")
from app.api import routes # noqa: E402, F401