Skip to content

Commit 366083b

Browse files
QwlouseThe etils Authors
authored andcommitted
remove obsolete AutoCast pytype workaround
PiperOrigin-RevId: 788877579
1 parent 8807c19 commit 366083b

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

etils/edc/cast_utils.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from __future__ import annotations
1818

1919
import dataclasses
20-
import typing
2120
from typing import Any, TypeVar
2221

2322
from etils.edc import field_utils
@@ -30,18 +29,7 @@
3029
_IS_NORMALIZED = object()
3130

3231

33-
if typing.TYPE_CHECKING:
34-
# TODO(b/254514368): Remove hack
35-
class _AutoCastMeta(type):
36-
37-
def __getitem__(cls, value):
38-
return value
39-
40-
class AutoCast(metaclass=_AutoCastMeta):
41-
pass
42-
43-
else:
44-
AutoCast = Annotated[_T, _IS_NORMALIZED] # pytype: disable=invalid-typevar
32+
AutoCast = Annotated[_T, _IS_NORMALIZED]
4533

4634

4735
def make_auto_cast_descriptor(

0 commit comments

Comments
 (0)