From a93982b27f08770ec9beb9c6f814b3f8b1043204 Mon Sep 17 00:00:00 2001 From: 7000pctAUTO Date: Mon, 2 Feb 2026 12:45:03 +0000 Subject: [PATCH] fix: resolve CI type annotation issues - 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 --- src/nl2gherkin/exporters/base.py | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/nl2gherkin/exporters/base.py b/src/nl2gherkin/exporters/base.py index 163f459..3796dcf 100644 --- a/src/nl2gherkin/exporters/base.py +++ b/src/nl2gherkin/exporters/base.py @@ -1,19 +1,18 @@ - """Base exporter class for BDD frameworks.""" +"""Base exporter class for BDD frameworks.""" from abc import ABC, abstractmethod -from typing import Dict, List class BaseExporter(ABC): """Base class for BDD framework exporters.""" @abstractmethod - def export(self, features: List[str]) -> str: + def export(self, features: list[str]) -> str: """Export features to the target framework format. - + Args: features: List of Gherkin feature strings. - + Returns: Exported content string. """ @@ -22,25 +21,25 @@ class BaseExporter(ABC): @abstractmethod def get_step_definitions_template(self) -> str: """Get step definitions template for this framework. - + Returns: Step definitions template string. """ pass @abstractmethod - def get_configuration_template(self) -> Dict[str, str]: + def get_configuration_template(self) -> dict[str, str]: """Get configuration files for this framework. - + Returns: Dictionary mapping filenames to content templates. """ pass - def _extract_scenarios(self, feature: str) -> List[str]: + def _extract_scenarios(self, feature: str) -> list[str]: """Extract individual scenarios from a feature string.""" - scenarios: List[str] = [] - current_scenario: List[str] = [] + scenarios: list[str] = [] + current_scenario: list[str] = [] in_scenario = False for line in feature.split("\n"):