Skip to content

Commit

Permalink
Minor fixes in parsers.py
Browse files Browse the repository at this point in the history
Fixed type annotations and documentation in query/parsers.py
  • Loading branch information
rahul4732saini committed Aug 2, 2024
1 parent 877edb7 commit 05b2276
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fise/query/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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] = []
Expand Down Expand Up @@ -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] = []
Expand Down

0 comments on commit 05b2276

Please sign in to comment.