From a3785aad8b22c2e2f55cc915cb35f7be627b354e Mon Sep 17 00:00:00 2001 From: zocomputer Date: Thu, 9 Apr 2026 04:39:46 +0000 Subject: [PATCH] Fix missing raise keyword in _get_selector_method The function was creating an InvalidSelectorMethodError exception but never raising it, causing the function to return None instead. This meant that invalid selector methods were silently accepted rather than raising an error as intended. --- src/twyn/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/twyn/main.py b/src/twyn/main.py index 32adfed..52ac9e9 100644 --- a/src/twyn/main.py +++ b/src/twyn/main.py @@ -279,7 +279,7 @@ def _get_dependencies_list( def _get_selector_method(selector_method: str) -> SelectorMethod: """Return the selector_method from set of available ones.""" if selector_method not in SELECTOR_METHOD_MAPPING: - InvalidSelectorMethodError("Invalid selector method") + raise InvalidSelectorMethodError("Invalid selector method") return SELECTOR_METHOD_MAPPING[selector_method]()