add misc. stuff
[bigint-presentation-code.git] / src / bigint_presentation_code / util.pyi
index 6f12d4b971fae32b9ea8f0377a6fe6e5204e675b..0e0dbc72a21e734e6afa9282996b4dcc76d21a58 100644 (file)
@@ -1,11 +1,18 @@
 from typing import (AbstractSet, Iterable, Iterator, Mapping,
-                    MutableSet, TypeVar, overload)
-from typing_extensions import final, Literal
+                    MutableSet, NoReturn, TypeVar, overload)
+from typing_extensions import final, Literal, Self
 
 _T_co = TypeVar("_T_co", covariant=True)
 _T = TypeVar("_T")
 
-__all__ = ["final", "Literal", "OFSet", "OSet", "FMap"]
+__all__ = ["final", "Literal", "Self", "assert_never", "OFSet", "OSet", "FMap"]
+
+
+# pyright currently doesn't like typing_extensions' definition
+# -- added to typing in python 3.11
+def assert_never(arg):
+    # type: (NoReturn) -> NoReturn
+    raise AssertionError("got to code that's supposed to be unreachable")
 
 
 class OFSet(AbstractSet[_T_co]):