If you want to exhaustively check an enum (or a literal) and have Mypy tell you when you forgot a case, you can write yourself a tiny utility function: from typing import NoReturn def unreachable(v: NoReturn) -> NoReturn: raise AssertionError() ...
blog.mrcljx.dev1 min read
No responses yet.