From 49b32c856038b55320cc41240ccfc1540f2bf6e3 Mon Sep 17 00:00:00 2001 From: Pablo Parada Date: Wed, 30 Oct 2024 14:57:30 +0100 Subject: [PATCH] fix: type-checking Eve dynamic attrs --- eve/flaskapp.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/eve/flaskapp.py b/eve/flaskapp.py index 5cb8791d5..630ca7bec 100644 --- a/eve/flaskapp.py +++ b/eve/flaskapp.py @@ -14,6 +14,7 @@ import os import sys import warnings +from typing import TYPE_CHECKING from events import Events from flask import Flask @@ -1102,3 +1103,6 @@ def __call__(self, environ, start_response): "HTTP_X_HTTP_METHOD_OVERRIDE", environ["REQUEST_METHOD"] ).upper() return super().__call__(environ, start_response) + + if TYPE_CHECKING: + def __setattr__(self, name, value): ...