Coverage for app/squawk/routes.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.14.3, created at 2026-06-28 23:33 +0000

1from flask import Blueprint, abort, render_template 

2from flask.typing import ResponseReturnValue # pyright: ignore[reportMissingImports] 

3 

4squawk_bp = Blueprint("squawk", __name__) 

5 

6_KNOWN = {7700, 7600, 7500, 7000, 1200} 

7 

8 

9@squawk_bp.route("/squawk/<int:code>") 

10def squawk(code: int) -> ResponseReturnValue: 

11 if code not in _KNOWN: 

12 abort(404) 

13 return render_template(f"squawk/{code}.html")