If you wrote the type signature of get_user as tuple[User, None] | tuple[None, Exception], the assertion would not be necessary and the type checker wouldn't complain.
get_user
tuple[User, None] | tuple[None, Exception]
Welcome to the Python community on the programming.dev Lemmy instance!
October 2023
November 2023
PastJuly 2023
August 2023
September 2023
If you wrote the type signature of
get_user
astuple[User, None] | tuple[None, Exception]
, the assertion would not be necessary and the type checker wouldn't complain.