Skip to content

Commit

Permalink
fix(stub): update python stub
Browse files Browse the repository at this point in the history
  • Loading branch information
ChieloNewctle committed Oct 18, 2023
1 parent 17d186e commit abc64d5
Showing 1 changed file with 43 additions and 129 deletions.
172 changes: 43 additions & 129 deletions general_sam/general_sam.pyi
Original file line number Diff line number Diff line change
@@ -1,165 +1,79 @@
from typing import Callable, Mapping, Optional, Sequence, Union


class TrieNode:
def is_in_chars(self) -> bool:
...

def is_in_bytes(self) -> bool:
...

def get_node_id(self) -> int:
...

def is_accepting(self) -> bool:
...

def get_trans(self) -> Mapping[Union[str, int], int]:
...

def get_parent(self) -> int:
...

def is_in_chars(self) -> bool: ...
def is_in_bytes(self) -> bool: ...
def get_node_id(self) -> int: ...
def is_accepting(self) -> bool: ...
def get_trans(self) -> Mapping[Union[str, int], int]: ...
def get_parent(self) -> int: ...

class Trie:
@staticmethod
def in_chars() -> 'Trie':
...

def in_chars() -> 'Trie': ...
@staticmethod
def in_bytes() -> 'Trie':
...

def is_in_chars(self) -> bool:
...

def is_in_bytes(self) -> bool:
...

def num_of_nodes(self) -> int:
...

def insert_chars(self, s: str) -> int:
...

def insert_bytes(self, s: bytes) -> int:
...

def get_bfs_order(self) -> Sequence[int]:
...

def get_root(self) -> TrieNode:
...

def get_node(self, node_id: int) -> Optional[TrieNode]:
...

def in_bytes() -> 'Trie': ...
def is_in_chars(self) -> bool: ...
def is_in_bytes(self) -> bool: ...
def num_of_nodes(self) -> int: ...
def insert_chars(self, s: str) -> int: ...
def insert_bytes(self, s: bytes) -> int: ...
def get_bfs_order(self) -> Sequence[int]: ...
def get_root(self) -> TrieNode: ...
def get_node(self, node_id: int) -> Optional[TrieNode]: ...
def dfs_travel(
self,
in_stack_callback: Callable[[int, Optional[str]], None],
out_stack_callback: Callable[[int], None],
root_node_id: Optional[int] = None,
) -> TrieNode:
...

) -> TrieNode: ...
def bfs_travel(
self,
in_queue_callback: Callable[[int, Optional[str]], None],
out_queue_callback: Callable[[int], None],
root_node_id: Optional[int] = None,
) -> TrieNode:
...

) -> TrieNode: ...

class GeneralSAMState:
def is_in_str(self) -> bool:
...

def is_in_bytes(self) -> bool:
...

def get_node_id(self) -> int:
...

def is_nil(self) -> bool:
...

def is_root(self) -> bool:
...

def is_accepting(self) -> bool:
...

def get_trans(self) -> Mapping[Union[str, int], int]:
...

def get_suffix_parent_id(self) -> int:
...

def copy(self) -> 'GeneralSAMState':
...

def goto_suffix_parent(self):
...

def goto_char(self, t: str):
...

def goto_byte(self, t: int):
...

def feed_chars(self, s: str):
...

def feed_bytes(self, s: bytes):
...

def is_in_str(self) -> bool: ...
def is_in_bytes(self) -> bool: ...
def get_node_id(self) -> int: ...
def is_nil(self) -> bool: ...
def is_root(self) -> bool: ...
def is_accepting(self) -> bool: ...
def get_trans(self) -> Mapping[Union[str, int], int]: ...
def get_suffix_parent_id(self) -> int: ...
def copy(self) -> 'GeneralSAMState': ...
def goto_suffix_parent(self): ...
def goto_char(self, t: str): ...
def goto_byte(self, t: int): ...
def feed_chars(self, s: str): ...
def feed_bytes(self, s: bytes): ...
def dfs_along(
self,
trie: Trie,
in_stack_callback: Callable[['GeneralSAMState', int, Optional[str]], None],
out_stack_callback: Callable[['GeneralSAMState', int], None],
trie_node_id: Optional[int] = None,
) -> TrieNode:
...

) -> TrieNode: ...
def bfs_along(
self,
trie: Trie,
in_queue_callback: Callable[['GeneralSAMState', int, Optional[str]], None],
out_queue_callback: Callable[['GeneralSAMState', int], None],
trie_node_id: Optional[int] = None,
) -> TrieNode:
...

) -> TrieNode: ...

class GeneralSAM:
@staticmethod
def construct_from_chars(s: str) -> 'GeneralSAM':
...

def construct_from_chars(s: str) -> 'GeneralSAM': ...
@staticmethod
def construct_from_bytes(s: bytes) -> 'GeneralSAM':
...

def construct_from_bytes(s: bytes) -> 'GeneralSAM': ...
@staticmethod
def construct_from_trie(trie: Trie) -> 'GeneralSAM':
...

def is_in_str(self) -> bool:
...

def is_in_bytes(self) -> bool:
...

def num_of_nodes(self) -> int:
...

def get_root_state(self) -> GeneralSAMState:
...

def get_state(self, node_id: int) -> GeneralSAMState:
...

def get_topo_order(self) -> Sequence[GeneralSAMState]:
...
def construct_from_trie(trie: Trie) -> 'GeneralSAM': ...
def is_in_str(self) -> bool: ...
def is_in_bytes(self) -> bool: ...
def num_of_nodes(self) -> int: ...
def get_root_state(self) -> GeneralSAMState: ...
def get_state(self, node_id: int) -> GeneralSAMState: ...
def get_topo_and_suf_len_sorted_states(self) -> Sequence[GeneralSAMState]: ...

0 comments on commit abc64d5

Please sign in to comment.