From 3e6175ee22b2e6a823a67e86e2ca79fd25b2b3c6 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Tue, 17 Sep 2024 20:59:55 -0300 Subject: [PATCH] mypy: remove redundant casts --- src/pytest_cpp/plugin.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/pytest_cpp/plugin.py b/src/pytest_cpp/plugin.py index 1013d86..138c654 100644 --- a/src/pytest_cpp/plugin.py +++ b/src/pytest_cpp/plugin.py @@ -6,7 +6,6 @@ from fnmatch import fnmatch from pathlib import Path from typing import Any -from typing import cast from typing import Iterator from typing import Sequence from typing import Type @@ -143,11 +142,8 @@ def from_parent( # type:ignore[override] arguments: Sequence[str], **kwargs: Any, ) -> CppFile: - return cast( - CppFile, - super().from_parent( - parent=parent, path=path, facade=facade, arguments=arguments - ), + return super().from_parent( + parent=parent, path=path, facade=facade, arguments=arguments ) def collect(self) -> Iterator[CppItem]: @@ -188,11 +184,8 @@ def from_parent( # type:ignore[override] arguments: Sequence[str], **kwargs: Any, ) -> CppItem: - return cast( - CppItem, - super().from_parent( - name=name, parent=parent, facade=facade, arguments=arguments, **kwargs - ), + return super().from_parent( + name=name, parent=parent, facade=facade, arguments=arguments, **kwargs ) def runtest(self) -> None: