Skip to content

Commit

Permalink
Merge pull request #730 from Chia-Network/remove_from_parent_hinting_…
Browse files Browse the repository at this point in the history
…for_now

remove `.from_parent()` hinting at least for now
  • Loading branch information
altendky authored Sep 25, 2024
2 parents bccb157 + e31b126 commit 7b4bfc8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
5 changes: 0 additions & 5 deletions wheel/generate_type_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ 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): ...",
],
"ClassgroupElement": [
"@staticmethod\n def create(bytes) -> ClassgroupElement: ...",
Expand Down Expand Up @@ -225,7 +224,6 @@ 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 aggregate(cls, spend_bundles: List[SpendBundle]) -> Self: ...",
"def name(self) -> bytes32: ...",
"def removals(self) -> List[Coin]: ...",
Expand All @@ -241,9 +239,6 @@ def parse_rust_source(filename: str, upper_case: bool) -> List[Tuple[str, List[s
"def ip_iters(self, constants: ConsensusConstants) -> uint64: ...",
"def sp_total_iters(self, constants: ConsensusConstants) -> uint128: ...",
],
"CoinSpend": [
"@classmethod\n def from_parent(cls, cs: Self): ...",
],
}

classes = []
Expand Down
6 changes: 0 additions & 6 deletions wheel/python/chia_rs/chia_rs.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,6 @@ class Coin:
puzzle_hash: bytes32
amount: uint64
def name(self) -> bytes32: ...
@classmethod
def from_parent(cls, _coin: Self): ...
def __init__(
self,
parent_coin_info: bytes,
Expand Down Expand Up @@ -637,8 +635,6 @@ class CoinSpend:
coin: Coin
puzzle_reveal: Program
solution: Program
@classmethod
def from_parent(cls, cs: Self): ...
def __init__(
self,
coin: Coin,
Expand Down Expand Up @@ -2342,8 +2338,6 @@ class SpendBundle:
coin_spends: List[CoinSpend]
aggregated_signature: G2Element
@classmethod
def from_parent(cls, spend_bundle: Self): ...
@classmethod
def aggregate(cls, spend_bundles: List[SpendBundle]) -> Self: ...
def name(self) -> bytes32: ...
def removals(self) -> List[Coin]: ...
Expand Down
10 changes: 9 additions & 1 deletion wheel/stubtest.allowlist
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ chia_rs.sized_byte_class.Iterable
chia_rs.sized_byte_class.BinaryIO.write
chia_rs.struct_stream.BinaryIO.write

# TODO: why are we implementing these just so they can report not implemented?
# these raise unimplemented
chia_rs.G1Element.from_parent
chia_rs.G2Element.from_parent
chia_rs.GTElement.from_parent
Expand All @@ -61,3 +61,11 @@ chia_rs.chia_rs.SpendBundleConditions.from_parent
chia_rs.chia_rs.SpendConditions.from_parent
chia_rs.spend.Spend.from_parent
chia_rs.spend.SpendConditions.from_parent

# these are implemented but not intended to be called from python
chia_rs.Coin.from_parent
chia_rs.CoinSpend.from_parent
chia_rs.SpendBundle.from_parent
chia_rs.chia_rs.Coin.from_parent
chia_rs.chia_rs.CoinSpend.from_parent
chia_rs.chia_rs.SpendBundle.from_parent

0 comments on commit 7b4bfc8

Please sign in to comment.