flask_accepts icon indicating copy to clipboard operation
flask_accepts copied to clipboard

Static typing on request.parsed_obj

Open delewis13 opened this issue 4 years ago • 0 comments

Hello and thanks for this awesome integration!

Just having some issues with static / inferred typing, hoping you could shed some light:

(1) VSCode / pylance is unaware of the "parsed_obj" attribute, giving the warning: Cannot access member "parsed_obj" for type "Request". Is there any way forward here? A monkey patch to the request object perhaps?

(2) In my post-load for UserSchema i return a User. Is there anyway to infer the type of request.parsed_obj using this?

Cheers :)

delewis13 avatar Oct 28 '20 02:10 delewis13