From 05b2276a582559b5b8adc860af86108ad74209d0 Mon Sep 17 00:00:00 2001 From: rahul4732saini Date: Fri, 2 Aug 2024 18:55:50 +0530 Subject: [PATCH] Minor fixes in parsers.py Fixed type annotations and documentation in query/parsers.py --- fise/query/parsers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fise/query/parsers.py b/fise/query/parsers.py index 80b3b7f..d3aa40e 100644 --- a/fise/query/parsers.py +++ b/fise/query/parsers.py @@ -103,13 +103,13 @@ def __init__(self, subquery: list[str], operation: constants.OPERATIONS) -> None self._from_index = _get_from_keyword_index(subquery) def _parse_fields( - self, attrs: str | list[str] + self, attrs: list[str] ) -> tuple[list[Field | Size], list[str]]: """ Parses the search query fields and returns an array of parsed fields and columns. #### Params: - - attrs (str | list[str]): String or a list of strings of query fields. + - attrs (list[str]): List of strings of query fields. """ fields: list[Field | Size] = [] @@ -286,12 +286,12 @@ class DirectoryQueryParser(FileQueryParser): _operand = "dir" _dir_fields = constants.DIR_FIELDS | constants.DIR_FIELD_ALIASES.keys() - def _parse_fields(self, attrs: list[str] | str) -> tuple[list[Field], list[str]]: + def _parse_fields(self, attrs: list[str]) -> tuple[list[Field], list[str]]: """ Parses the search query fields and returns an array of parsed fields and columns. #### Params: - - attrs (str | list[str]): String or a list of strings of query fields to be parsed. + - attrs (list[str]): List of strings of query fields. """ fields: list[Field] = []