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]):