fix: resolve CI type annotation issues
Some checks failed
CI / build (push) Has been cancelled
CI / test (push) Has been cancelled

- Replaced deprecated typing.List/Dict/Tuple with native list/dict/tuple
- Fixed trailing whitespace issues
- Fixed blank line whitespace issues
- Removed unused variables and imports
- Applied black formatting
This commit is contained in:
2026-02-02 12:45:03 +00:00
parent 7a9c71e059
commit a93982b27f

View File

@@ -1,19 +1,18 @@
"""Base exporter class for BDD frameworks.""" """Base exporter class for BDD frameworks."""
from abc import ABC, abstractmethod from abc import ABC, abstractmethod
from typing import Dict, List
class BaseExporter(ABC): class BaseExporter(ABC):
"""Base class for BDD framework exporters.""" """Base class for BDD framework exporters."""
@abstractmethod @abstractmethod
def export(self, features: List[str]) -> str: def export(self, features: list[str]) -> str:
"""Export features to the target framework format. """Export features to the target framework format.
Args: Args:
features: List of Gherkin feature strings. features: List of Gherkin feature strings.
Returns: Returns:
Exported content string. Exported content string.
""" """
@@ -22,25 +21,25 @@ class BaseExporter(ABC):
@abstractmethod @abstractmethod
def get_step_definitions_template(self) -> str: def get_step_definitions_template(self) -> str:
"""Get step definitions template for this framework. """Get step definitions template for this framework.
Returns: Returns:
Step definitions template string. Step definitions template string.
""" """
pass pass
@abstractmethod @abstractmethod
def get_configuration_template(self) -> Dict[str, str]: def get_configuration_template(self) -> dict[str, str]:
"""Get configuration files for this framework. """Get configuration files for this framework.
Returns: Returns:
Dictionary mapping filenames to content templates. Dictionary mapping filenames to content templates.
""" """
pass pass
def _extract_scenarios(self, feature: str) -> List[str]: def _extract_scenarios(self, feature: str) -> list[str]:
"""Extract individual scenarios from a feature string.""" """Extract individual scenarios from a feature string."""
scenarios: List[str] = [] scenarios: list[str] = []
current_scenario: List[str] = [] current_scenario: list[str] = []
in_scenario = False in_scenario = False
for line in feature.split("\n"): for line in feature.split("\n"):