Skip to content

Commit

Permalink
Add __new__
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Aug 7, 2024
1 parent f42b81e commit 8de3fd3
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 @@ -356,6 +359,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 @@ -388,6 +392,10 @@ def __init__(
self,
leafs: List[bytes32],
) -> None: ...
def __new__(
cls,
leafs: List[bytes32],
) -> MerkleSet: ...
"""
)

Expand All @@ -397,7 +405,6 @@ def __init__(
[],
[
"SIZE: ClassVar[int] = ...",
"def __new__(cls) -> G1Element: ...",
"def get_fingerprint(self) -> int: ...",
"def verify(self, signature: G2Element, msg: bytes) -> bool: ...",
"def pair(self, other: G2Element) -> GTElement: ...",
Expand All @@ -415,7 +422,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 8de3fd3

Please sign in to comment.