Skip to content

Commit

Permalink
add .from_parent() return type
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Sep 25, 2024
1 parent bccb157 commit 1a4ff94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions wheel/generate_type_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s
extra_members = {
"Coin": [
"def name(self) -> bytes32: ...",
"@classmethod\n def from_parent(cls, _coin: Self): ...",
"@classmethod\n def from_parent(cls, _coin: Self) -> Self: ...",
],
"ClassgroupElement": [
"@staticmethod\n def create(bytes) -> ClassgroupElement: ...",
Expand Down Expand Up @@ -225,7 +225,7 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s
"def uncurry(self) -> Tuple[ChiaProgram, ChiaProgram]: ...",
],
"SpendBundle": [
"@classmethod\n def from_parent(cls, spend_bundle: Self): ...",
"@classmethod\n def from_parent(cls, spend_bundle: Self) -> Self: ...",
"@classmethod\n def aggregate(cls, spend_bundles: List[SpendBundle]) -> Self: ...",
"def name(self) -> bytes32: ...",
"def removals(self) -> List[Coin]: ...",
Expand All @@ -242,7 +242,7 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s
"def sp_total_iters(self, constants: ConsensusConstants) -> uint128: ...",
],
"CoinSpend": [
"@classmethod\n def from_parent(cls, cs: Self): ...",
"@classmethod\n def from_parent(cls, cs: Self) -> Self: ...",
],
}

Expand Down
6 changes: 3 additions & 3 deletions wheel/python/chia_rs/chia_rs.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ class Coin:
amount: uint64
def name(self) -> bytes32: ...
@classmethod
def from_parent(cls, _coin: Self): ...
def from_parent(cls, _coin: Self) -> Self: ...
def __init__(
self,
parent_coin_info: bytes,
Expand Down Expand Up @@ -638,7 +638,7 @@ class CoinSpend:
puzzle_reveal: Program
solution: Program
@classmethod
def from_parent(cls, cs: Self): ...
def from_parent(cls, cs: Self) -> Self: ...
def __init__(
self,
coin: Coin,
Expand Down Expand Up @@ -2342,7 +2342,7 @@ class SpendBundle:
coin_spends: List[CoinSpend]
aggregated_signature: G2Element
@classmethod
def from_parent(cls, spend_bundle: Self): ...
def from_parent(cls, spend_bundle: Self) -> Self: ...
@classmethod
def aggregate(cls, spend_bundles: List[SpendBundle]) -> Self: ...
def name(self) -> bytes32: ...
Expand Down

0 comments on commit 1a4ff94

Please sign in to comment.