diff --git a/wheel/generate_type_stubs.py b/wheel/generate_type_stubs.py index f4903ef60..e9503326d 100644 --- a/wheel/generate_type_stubs.py +++ b/wheel/generate_type_stubs.py @@ -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: ...", @@ -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]: ...", @@ -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: ...", ], } diff --git a/wheel/python/chia_rs/chia_rs.pyi b/wheel/python/chia_rs/chia_rs.pyi index 7b5943a11..ff9be0255 100644 --- a/wheel/python/chia_rs/chia_rs.pyi +++ b/wheel/python/chia_rs/chia_rs.pyi @@ -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, @@ -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, @@ -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: ...