Skip to content

Commit 46d4b35

Browse files
dnicolodirgommers
authored andcommitted
MAINT: remove unnecessary type cast
The cast was anyhow to an incorrect type.
1 parent 40594e0 commit 46d4b35

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

mesonpy/__init__.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -831,13 +831,10 @@ def with_temp_working_dir(
831831
yield cls(source_dir, tmpdir, build_dir, meson_args, editable_verbose)
832832

833833
@functools.lru_cache()
834-
def _info(self, name: str) -> Dict[str, Any]:
834+
def _info(self, name: str) -> Any:
835835
"""Read info from meson-info directory."""
836-
file = self._build_dir.joinpath('meson-info', f'{name}.json')
837-
return typing.cast(
838-
Dict[str, str],
839-
json.loads(file.read_text())
840-
)
836+
info = self._build_dir.joinpath('meson-info', f'{name}.json')
837+
return json.loads(info.read_text())
841838

842839
@property
843840
def _install_plan(self) -> Dict[str, Dict[str, Dict[str, str]]]:

0 commit comments

Comments
 (0)