Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Commit

Permalink
style: apply automated linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
megalinter-bot committed Apr 3, 2023
1 parent 9c86cae commit 3c9ece5
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/library_analyzer/processing/api/_extract_valid_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def extract_valid_literals(param_description: str, param_type: str) -> set[str]:
set[str]
A set of valid, extracted values of the parameter to be examined.
"""

description_config: DescriptionStringConfiguration = DescriptionStringConfiguration()
type_config: TypeStringConfiguration = TypeStringConfiguration()
none_and_bool = {"False", "None", "True"}
Expand Down Expand Up @@ -97,7 +96,6 @@ def _extract_from_type_curly_enum(type_string: str) -> set[str]:
set[str]
A set of valid values from the parameter description to be examined.
"""

matches = re.findall(r"\{(.*?)}", type_string)
extracted = []

Expand All @@ -122,7 +120,6 @@ def _extract_from_type_listing(type_string: str) -> set[str]:
set[str]
A set of valid values from the parameter description to be examined.
"""

# Multiple values seperated by ',', 'and' or 'or' with single# quotes
single_and_or_pattern = r"('[^']*'|bool|str)\s*(?:and|or|,)?"
# Multiple values seperated by ',', 'and' or'or' with double quotes
Expand Down Expand Up @@ -159,7 +156,6 @@ def _extract_from_description_if_listing(description: str) -> set[str]:
set[str]
A set of valid values from the parameter description to be examined.
"""

pattern = r"[-\+\*]?\s*If\s*('[^']*'|\"[^\"]*\"|True|False|None)"
matches = re.findall(pattern, description)
return set(matches)
Expand All @@ -182,7 +178,6 @@ def _extract_from_description_indented_listing(description: str) -> set[str]:
set[str]
A set of valid values from the parameter description to be examined.
"""

pattern = r"[-\+\*]?\s+(\"[^\"]*\"|'[^']*'|None|True|False):"
matches = re.findall(pattern, description)
return set(matches)
Expand All @@ -203,7 +198,6 @@ def _extract_from_description_when_set_to(description: str) -> set[str]:
set[str]
A set of valid literals from the parameter description to be examined.
"""

pattern = r"When set to (\"[^\"]*\"|'[^']*'|None|True|False)"
matches = re.findall(pattern, description, re.IGNORECASE)
return set(matches)

0 comments on commit 3c9ece5

Please sign in to comment.