@@ -46,7 +46,7 @@ def get_tag_names(tag_data: list[GherkinTag]) -> set[str]:
4646 """Extract tag names from tag data.
4747
4848 Args:
49- tag_data (List [dict]): The tag data to extract names from.
49+ tag_data (list [dict]): The tag data to extract names from.
5050
5151 Returns:
5252 set[str]: A set of tag names.
@@ -64,7 +64,7 @@ class Feature:
6464 rel_filename (str): The relative path of the feature file.
6565 name (str): The name of the feature.
6666 tags (set[str]): A set of tags associated with the feature.
67- background (Optional[ Background] ): The background steps for the feature, if any.
67+ background (Background | None ): The background steps for the feature, if any.
6868 line_number (int): The line number where the feature starts in the file.
6969 description (str): The description of the feature.
7070 """
@@ -86,10 +86,10 @@ class Examples:
8686 """Represents examples used in scenarios for parameterization.
8787
8888 Attributes:
89- line_number (Optional[ int] ): The line number where the examples start.
90- name (Optional[ str] ): The name of the examples.
91- example_params (List [str]): The names of the parameters for the examples.
92- examples (List [Sequence[str]]): The list of example rows.
89+ line_number (int | None ): The line number where the examples start.
90+ name (str | None ): The name of the examples.
91+ example_params (list [str]): The names of the parameters for the examples.
92+ examples (list [Sequence[str]]): The list of example rows.
9393 """
9494
9595 line_number : int | None = None
@@ -152,11 +152,11 @@ class ScenarioTemplate:
152152 name (str): The name of the scenario.
153153 line_number (int): The line number where the scenario starts in the file.
154154 templated (bool): Whether the scenario is templated.
155- description (Optional[ str] ): The description of the scenario.
155+ description (str | None ): The description of the scenario.
156156 tags (set[str]): A set of tags associated with the scenario.
157- _steps (List [Step]): The list of steps in the scenario (internal use only).
158- examples (Optional[ Examples] ): The examples used for parameterization in the scenario.
159- rule (Optional[ Rule] ): The rule to which the scenario may belong (None = no rule).
157+ _steps (list [Step]): The list of steps in the scenario (internal use only).
158+ examples (Examples | None ): The examples used for parameterization in the scenario.
159+ rule (Rule | None ): The rule to which the scenario may belong (None = no rule).
160160 """
161161
162162 feature : Feature
@@ -195,7 +195,7 @@ def steps(self) -> list[Step]:
195195 """Get all steps for the scenario, including background steps.
196196
197197 Returns:
198- List [Step]: A list of steps, including any background steps from the feature.
198+ list [Step]: A list of steps, including any background steps from the feature.
199199 """
200200 return self .all_background_steps + self ._steps
201201
@@ -242,8 +242,8 @@ class Scenario:
242242 keyword (str): The keyword used to define the scenario.
243243 name (str): The name of the scenario.
244244 line_number (int): The line number where the scenario starts in the file.
245- steps (List [Step]): The list of steps in the scenario.
246- description (Optional[ str] ): The description of the scenario.
245+ steps (list [Step]): The list of steps in the scenario.
246+ description (str | None ): The description of the scenario.
247247 tags (set[str]): A set of tags associated with the scenario.
248248 """
249249
@@ -268,8 +268,8 @@ class Step:
268268 indent (int): The indentation level of the step.
269269 keyword (str): The keyword used for the step (e.g., 'Given', 'When', 'Then').
270270 failed (bool): Whether the step has failed (internal use only).
271- scenario (Optional[ ScenarioTemplate] ): The scenario to which this step belongs (internal use only).
272- background (Optional[ Background] ): The background to which this step belongs (internal use only).
271+ scenario (ScenarioTemplate | None ): The scenario to which this step belongs (internal use only).
272+ background (Background | None ): The background to which this step belongs (internal use only).
273273 """
274274
275275 type : str
@@ -344,7 +344,7 @@ class Background:
344344
345345 Attributes:
346346 line_number (int): The line number where the background starts in the file.
347- steps (List [Step]): The list of steps in the background.
347+ steps (list [Step]): The list of steps in the background.
348348 """
349349
350350 line_number : int
@@ -378,10 +378,10 @@ def parse_steps(self, steps_data: list[GherkinStep]) -> list[Step]:
378378 """Parse a list of step data into Step objects.
379379
380380 Args:
381- steps_data (List [dict]): The list of step data.
381+ steps_data (list [dict]): The list of step data.
382382
383383 Returns:
384- List [Step]: A list of Step objects.
384+ list [Step]: A list of Step objects.
385385 """
386386
387387 if not steps_data :
@@ -421,7 +421,7 @@ def parse_scenario(
421421 Args:
422422 scenario_data (dict): The dictionary containing scenario data.
423423 feature (Feature): The feature to which this scenario belongs.
424- rule (Optional[ Rule] ): The rule to which this scenario may belong. (None = no rule)
424+ rule (Rule | None ): The rule to which this scenario may belong. (None = no rule)
425425
426426 Returns:
427427 ScenarioTemplate: A ScenarioTemplate object representing the parsed scenario.
0 commit comments