From eede48abc8e72abb809201ff56510ef8250b0a7a Mon Sep 17 00:00:00 2001 From: Tomoko Uchida Date: Sat, 9 Dec 2023 22:23:55 +0900 Subject: [PATCH] Add python stub with type hints. (#168) --- tantivy/py.typed | 0 tantivy/tantivy.pyi | 94 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 tantivy/py.typed create mode 100644 tantivy/tantivy.pyi diff --git a/tantivy/py.typed b/tantivy/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/tantivy/tantivy.pyi b/tantivy/tantivy.pyi new file mode 100644 index 0000000..7da14b2 --- /dev/null +++ b/tantivy/tantivy.pyi @@ -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 \ No newline at end of file