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

This commit is contained in:
2026-02-02 12:56:01 +00:00
parent 688d338c69
commit df90a5fc4f

View File

@@ -0,0 +1,25 @@
from typing import List
from requirements_to_gherkin.models import Feature, Scenario, Step
class GherkinGenerator:
def generate(self, requirements: dict) -> List[Feature]:
features = []
for req_name, req_data in requirements.items():
feature = self._create_feature(req_name, req_data)
features.append(feature)
return features
def _create_feature(self, name: str, data: dict) -> Feature:
feature = Feature(name=name)
feature.add_element(
Scenario(
name="Default scenario",
steps=[
Step("Given", "the system is initialized"),
Step("When", "the action is triggered"),
Step("Then", "the expected outcome occurs"),
],
)
)
return feature