From 9dab57b0e876e276c3fb2988a0258d538525d3d5 Mon Sep 17 00:00:00 2001 From: Lars Date: Sat, 25 Apr 2020 13:14:31 +0200 Subject: [PATCH] Fix attr-defined check for werkzeug.wrappers.BaseRequest (fixes #3913) (#3925) The PR #2740 added __setattr__ and __getattr__ to the werkzeug.wrappers.BaseRequest definition to silence mypy when monkeypatching this class. The change disabled the errors for monkeypatching, but disabled disabled the important check attr-defined. --- third_party/2and3/werkzeug/wrappers.pyi | 5 ----- 1 file changed, 5 deletions(-) diff --git a/third_party/2and3/werkzeug/wrappers.pyi b/third_party/2and3/werkzeug/wrappers.pyi index 45a2f009b..2b8b34ffe 100644 --- a/third_party/2and3/werkzeug/wrappers.pyi +++ b/third_party/2and3/werkzeug/wrappers.pyi @@ -87,11 +87,6 @@ class BaseRequest: is_multiprocess: bool is_run_once: bool - # These are not preset at runtime but we add them since monkeypatching this - # class is quite common. - def __setattr__(self, name: str, value: Any): ... - def __getattr__(self, name: str): ... - _OnCloseT = TypeVar('_OnCloseT', bound=Callable[[], Any]) _SelfT = TypeVar('_SelfT', bound=BaseResponse)