You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since v2 and the typing stubs, the get method of the Headers data structure always returns a Optional[str]. However in some cases we can know statically that it will return a str. Indeed when a default string parameter is given, then the function always return a str.
Since v2 and the typing stubs, the
get
method of theHeaders
data structure always returns aOptional[str]
. However in some cases we can know statically that it will return astr
. Indeed when a default string parameter is given, then the function always return astr
.Here's a preview of my code before v2:
Now that
werkzeug
is typed, the.replace
will raise an typing error when analyzed withmypy
.I can fix it like this:
or even like this
But I feel like all of those patches shouldn't be required. I'll send a type fix.
The text was updated successfully, but these errors were encountered: