Skip to content

Commit

Permalink
feat: Expose the Empty and EmptyType types. (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanCardin authored Jun 4, 2024
1 parent 2d37d38 commit e79b8f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions type_lens/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

from .parameter_view import ParameterView
from .type_view import TypeView
from .types.empty import Empty, EmptyType

__all__ = (
"ParameterView",
"TypeView",
"EmptyType",
"Empty",
)
4 changes: 3 additions & 1 deletion type_lens/types/empty.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

from typing_extensions import TypeAlias

__all__ = ("Empty", "EmptyType")

from enum import Enum
Expand All @@ -12,5 +14,5 @@ class _EmptyEnum(Enum):
EMPTY = 0


EmptyType = Literal[_EmptyEnum.EMPTY]
EmptyType: TypeAlias = Literal[_EmptyEnum.EMPTY]
Empty: Final = _EmptyEnum.EMPTY

0 comments on commit e79b8f2

Please sign in to comment.