Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion clvm/SExp.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ def to_sexp_type(
return stack[0]


_T_SExp = typing.TypeVar("_T_SExp")


class SExp:
"""
SExp provides higher level API on top of any object implementing the CLVM
Expand Down Expand Up @@ -173,7 +176,7 @@ def as_bin(self):
return f.getvalue()

@classmethod
def to(class_, v: CastableType) -> "SExp":
def to(class_: typing.Type[_T_SExp], v: CastableType) -> _T_SExp:
if isinstance(v, class_):
return v

Expand Down
Empty file added clvm/py.typed
Empty file.
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
setup(
name="clvm",
packages=["clvm",],
package_data={
"": ["py.typed"],
},
author="Chia Network, Inc.",
author_email="[email protected]",
url="https://github.com/Chia-Network/clvm",
Expand Down