From 7c4db12073a7607b0410bad0c932ddbb30921de3 Mon Sep 17 00:00:00 2001 From: Matheus Mendes Date: Wed, 18 Dec 2024 10:43:24 -0300 Subject: [PATCH] chore(pyi): fixing the search function and SearchType definition --- Cargo.lock | 2 +- Cargo.toml | 2 +- rxml.pyi | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 59acd9c..2c1daf6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -151,7 +151,7 @@ dependencies = [ [[package]] name = "rxml" -version = "2.1.1" +version = "2.1.2" dependencies = [ "pyo3", "quick-xml", diff --git a/Cargo.toml b/Cargo.toml index 062a01f..496f49b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rxml" -version = "2.1.1" +version = "2.1.2" edition = "2021" [lib] diff --git a/rxml.pyi b/rxml.pyi index 06b4073..ac8db49 100644 --- a/rxml.pyi +++ b/rxml.pyi @@ -1,9 +1,9 @@ from enum import Enum class SearchType(Enum): - tag: str - attr: str - text: str + Tag: str + Attr: str + Text: str class Node: name: str @@ -21,7 +21,9 @@ class Node: def __to_string(self, spacing: int | None) -> str: ... def __str__(self) -> str: ... def __repr__(self) -> str: ... - def search(self, by: str, value: str, depth: int | None = None) -> list[Node]: ... + def search( + self, by: SearchType, value: str, depth: int | None = None + ) -> list[Node]: ... def read_file(file_path: str, root_tag: str) -> Node: ... def read_string(xml_string: str, root_tag: str) -> Node: ...