Skip to content

Commit 3e6175e

Browse files
committedSep 17, 2024
mypy: remove redundant casts
1 parent f2b0f96 commit 3e6175e

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed
 

‎src/pytest_cpp/plugin.py

+4-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from fnmatch import fnmatch
77
from pathlib import Path
88
from typing import Any
9-
from typing import cast
109
from typing import Iterator
1110
from typing import Sequence
1211
from typing import Type
@@ -143,11 +142,8 @@ def from_parent( # type:ignore[override]
143142
arguments: Sequence[str],
144143
**kwargs: Any,
145144
) -> CppFile:
146-
return cast(
147-
CppFile,
148-
super().from_parent(
149-
parent=parent, path=path, facade=facade, arguments=arguments
150-
),
145+
return super().from_parent(
146+
parent=parent, path=path, facade=facade, arguments=arguments
151147
)
152148

153149
def collect(self) -> Iterator[CppItem]:
@@ -188,11 +184,8 @@ def from_parent( # type:ignore[override]
188184
arguments: Sequence[str],
189185
**kwargs: Any,
190186
) -> CppItem:
191-
return cast(
192-
CppItem,
193-
super().from_parent(
194-
name=name, parent=parent, facade=facade, arguments=arguments, **kwargs
195-
),
187+
return super().from_parent(
188+
name=name, parent=parent, facade=facade, arguments=arguments, **kwargs
196189
)
197190

198191
def runtest(self) -> None:

0 commit comments

Comments
 (0)