Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add python stub with type hints. #168

Merged
merged 1 commit into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added tantivy/py.typed
Empty file.
94 changes: 94 additions & 0 deletions tantivy/tantivy.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
class Schema:
pass

class SchemaBuilder:
def add_text_field(
self,
name: str,
stored: bool = False,
tokenizer_name: str = "default",
index_option: str = "position",
) -> SchemaBuilder:
pass

def add_integer_field(
self,
name: str,
stored: bool = False,
indexed: bool = False,
fast: bool = False,
) -> SchemaBuilder:
pass

def add_float_field(
self,
name: str,
stored: bool = False,
indexed: bool = False,
fast: bool = False,
) -> SchemaBuilder:
pass

def add_unsigned_field(
self,
name: str,
stored: bool = False,
indexed: bool = False,
fast: bool = False,
) -> SchemaBuilder:
pass

def add_boolean_field(
self,
name: str,
stored: bool = False,
indexed: bool = False,
fast: bool = False,
) -> SchemaBuilder:
pass

def add_date_field(
self,
name: str,
stored: bool = False,
indexed: bool = False,
fast: bool = False,
) -> SchemaBuilder:
pass

def add_json_field(
self,
name: str,
stored: bool = False,
tokenizer_name: str = "default",
index_option: str = "position",
) -> SchemaBuilder:
pass

def add_facet_field(
self,
name: str,
) -> SchemaBuilder:
pass

def add_bytes_field(
self,
name: str,
stored: bool = False,
indexed: bool = False,
fast: bool = False,
index_option: str = "position",
) -> SchemaBuilder:
pass

def add_ip_addr_field(
self,
name: str,
stored: bool = False,
indexed: bool = False,
fast: bool = False,
) -> SchemaBuilder:
pass

def build(self) -> Schema:
pass
Loading