Skip to content

Commit

Permalink
Add __new__
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Jul 8, 2024
1 parent 9b33d14 commit 5d4292a
Show file tree
Hide file tree
Showing 2 changed files with 817 additions and 4 deletions.
10 changes: 8 additions & 2 deletions wheel/generate_type_stubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class {name}:{"".join(map(add_indent, members))}
def __init__(
self{init_args}
) -> None: ...
def __new__(
cls{init_args}
) -> {name}: ...
def __hash__(self) -> int: ...
def __repr__(self) -> str: ...
def __richcmp__(self) -> Any: ...
Expand Down Expand Up @@ -336,6 +339,7 @@ def get_puzzle_and_solution_for_coin(program: ReadableBuffer, args: ReadableBuff
class BLSCache:
def __init__(self, cache_size: Optional[int] = 50000) -> None: ...
def __new__(cls, cache_size: Optional[int] = 50000) -> BLSCache: ...
def len(self) -> int: ...
def aggregate_verify(self, pks: List[G1Element], msgs: List[bytes], sig: G2Element) -> bool: ...
def items(self) -> List[Tuple[bytes, bytes]]: ...
Expand Down Expand Up @@ -368,6 +372,10 @@ def __init__(
self,
leafs: List[bytes32],
) -> None: ...
def __new__(
cls,
leafs: List[bytes32],
) -> MerkleSet: ...
"""
)

Expand All @@ -377,7 +385,6 @@ def __init__(
[],
[
"SIZE: ClassVar[int] = ...",
"def __new__(cls) -> G1Element: ...",
"def get_fingerprint(self) -> int: ...",
"def pair(self, other: G2Element) -> GTElement: ...",
"@staticmethod",
Expand All @@ -394,7 +401,6 @@ def __init__(
[],
[
"SIZE: ClassVar[int] = ...",
"def __new__(cls) -> G2Element: ...",
"def pair(self, other: G1Element) -> GTElement: ...",
"@staticmethod",
"def generator() -> G2Element: ...",
Expand Down
Loading

0 comments on commit 5d4292a

Please sign in to comment.