Skip to content

Commit c4eb160

Browse files
committed
refactor(robot): remove unnecessary type casting in CacheEntry
1 parent 7f14925 commit c4eb160

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/robot/src/robotcode/robot/diagnostics/data_cache.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from dataclasses import dataclass
77
from enum import Enum
88
from pathlib import Path
9-
from typing import Any, Generic, Iterator, List, Optional, Tuple, Type, TypeVar, Union, cast
9+
from typing import Any, Generic, Iterator, List, Optional, Tuple, Type, TypeVar, Union
1010

1111
from ..utils import get_robot_version_str
1212

@@ -56,7 +56,7 @@ def meta(self) -> Optional[_M]:
5656
result = pickle.loads(self._meta_blob)
5757
if not isinstance(result, self._meta_type):
5858
raise TypeError(f"Expected {self._meta_type} but got {type(result)}")
59-
self._meta_cache = cast(_M, result)
59+
self._meta_cache = result
6060
self._meta_loaded = True
6161
return self._meta_cache
6262

@@ -72,7 +72,7 @@ def data(self) -> _D:
7272
result = pickle.loads(row[0])
7373
if not isinstance(result, self._data_type):
7474
raise TypeError(f"Expected {self._data_type} but got {type(result)}")
75-
self._data_cache = cast(_D, result)
75+
self._data_cache = result
7676
self._data_loaded = True
7777

7878
assert self._data_cache is not None

0 commit comments

Comments
 (0)