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.
This commit is contained in:
Lars authored and GitHub committed 2020-04-25 13:14:31 +02:00
1 parent 31705fca7a
commit 9dab57b0e8
1 file changed
-5
-5
View File
@@ -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)