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
venv/lib/python3.12/site-packages/web/repositories/token.py: note: In function "create_token":
venv/lib/python3.12/site-packages/web/repositories/token.py:13:16: error: "Token" has no attribute "access_token"
[attr-defined]
return str(refresh.access_token)
^~~~~~~~~~~~~~~~~~~~
Token.for_user class method returns cls() which allows subclasses returns it's own instances. But annotations says it would always be a Token.
Maybe typing.Self would work?
The text was updated successfully, but these errors were encountered:
Let say we have code block like this:
That would produce error in mypy:
Token.for_user
class method returnscls()
which allows subclasses returns it's own instances. But annotations says it would always be a Token.Maybe
typing.Self
would work?The text was updated successfully, but these errors were encountered: