From 3ca3fee9ffc35b3486bd60ba54041e607d854751 Mon Sep 17 00:00:00 2001 From: Cameron <561860+wallies@users.noreply.github.com> Date: Mon, 23 Sep 2024 18:42:20 +1000 Subject: [PATCH] Expose version info (#349) --- src/lib.rs | 2 ++ tantivy/tantivy.pyi | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index e5836573..767c6277 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -90,6 +90,8 @@ fn tantivy(_py: Python, m: &Bound) -> PyResult<()> { m.add_wrapped(wrap_pymodule!(query_parser_error))?; + m.add("__version__", tv::version_string())?; + Ok(()) } diff --git a/tantivy/tantivy.pyi b/tantivy/tantivy.pyi index 316075f3..a2fae48c 100644 --- a/tantivy/tantivy.pyi +++ b/tantivy/tantivy.pyi @@ -439,3 +439,6 @@ class SnippetGenerator: def set_max_num_chars(self, max_num_chars: int) -> None: pass + +__version__: str +