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
However, the static checker (I'm using PyRight) complains that furl.furl.furl does not match request.post's signature for Text | bytes.
I'm newish to Python still, but I think it would require adding the superclass:
fromtypingimportText# at https://github.com/gruns/furl/blob/d0bee9a27d7f432b047194a94f64cd4ff0319f6a/furl/furl.py#L1337-L1338classfurl(URLPathCompositionInterface, QueryCompositionInterface,
FragmentCompositionInterface, UnicodeMixin, Text):
Then using a factory function named furl.
In the meantime, this is my workaround to satisfy the checker:
# in my utils/__init__.pyfromtypingimportTextfromfurlimportfurlasFurlOrigclassFurl(FurlOrig, Text): # bonus: capitalized class name less surprisingpassdeffurl(*args, **kwargs) ->Furl:
returnFurl(*args, **kwargs)
# usage in other filesfromutilsimportfurl# use `furl` as normal
The text was updated successfully, but these errors were encountered:
If
furl
were atyping.Text
, it would work with static type checkers/hinters.I like that the following works:
However, the static checker (I'm using PyRight) complains that
furl.furl.furl
does not matchrequest.post
's signature forText | bytes
.I'm newish to Python still, but I think it would require adding the superclass:
Then using a factory function named
furl
.In the meantime, this is my workaround to satisfy the checker:
The text was updated successfully, but these errors were encountered: