mirror of
https://github.com/donlon/cloudflare-error-page.git
synced 2025-12-19 23:09:29 +00:00
python: support type hinting for input params
This commit is contained in:
@@ -11,6 +11,7 @@ from flask import (
|
||||
redirect,
|
||||
)
|
||||
|
||||
from cloudflare_error_page import ErrorPageParams
|
||||
from cloudflare_error_page import render as render_cf_error_page
|
||||
from .utils import fill_cf_template_params
|
||||
|
||||
@@ -22,7 +23,7 @@ bp = Blueprint('examples', __name__, url_prefix='/')
|
||||
|
||||
param_cache: dict[str, dict] = {}
|
||||
|
||||
def get_page_params(name: str) -> dict:
|
||||
def get_page_params(name: str) -> ErrorPageParams:
|
||||
name = re.sub(r'[^\w]', '', name)
|
||||
params = param_cache.get(name)
|
||||
if params is not None:
|
||||
|
||||
Reference in New Issue
Block a user