Fix mypy
This commit is contained in:
parent
8835e3ae33
commit
ae721f9af0
|
@ -128,7 +128,7 @@ class DataTable:
|
||||||
location=Location.from_dict(data["location"]), rows=[Row.from_dict(row) for row in data.get("rows", [])]
|
location=Location.from_dict(data["location"]), rows=[Row.from_dict(row) for row in data.get("rows", [])]
|
||||||
)
|
)
|
||||||
|
|
||||||
def transpose(self) -> Self:
|
def transpose(self) -> DataTable:
|
||||||
# Transpose the cells, turning rows into columns
|
# Transpose the cells, turning rows into columns
|
||||||
if not self.rows:
|
if not self.rows:
|
||||||
return self # Return itself if there are no rows to transpose
|
return self # Return itself if there are no rows to transpose
|
||||||
|
|
|
@ -45,6 +45,7 @@ from typing import Any, Callable, Iterable, Literal, TypeVar
|
||||||
import pytest
|
import pytest
|
||||||
from typing_extensions import ParamSpec
|
from typing_extensions import ParamSpec
|
||||||
|
|
||||||
|
from .gherkin_parser import DataTable
|
||||||
from .parser import Step
|
from .parser import Step
|
||||||
from .parsers import StepParser, get_parser
|
from .parsers import StepParser, get_parser
|
||||||
from .types import GIVEN, THEN, WHEN
|
from .types import GIVEN, THEN, WHEN
|
||||||
|
@ -67,6 +68,7 @@ class StepFunctionContext:
|
||||||
parser: StepParser
|
parser: StepParser
|
||||||
converters: dict[str, Callable[[str], Any]] = field(default_factory=dict)
|
converters: dict[str, Callable[[str], Any]] = field(default_factory=dict)
|
||||||
target_fixture: str | None = None
|
target_fixture: str | None = None
|
||||||
|
data_table: DataTable | None = None
|
||||||
|
|
||||||
|
|
||||||
def get_step_fixture_name(step: Step) -> str:
|
def get_step_fixture_name(step: Step) -> str:
|
||||||
|
|
Loading…
Reference in New Issue