Skip to content

Commit 726415d

Browse files
authored
import sint directly in movement.py TYPE_CHECKING (tinygrad#14406)
avoid creating string TypeAlias, fixed warning in `TYPED=1 python test/test_tiny.py`
1 parent acb2fc3 commit 726415d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tinygrad/mixin/movement.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# mixins add syntactic sugar to Tensor and UOp
2-
from typing import TypeAlias, TYPE_CHECKING, Self
2+
from __future__ import annotations
3+
from typing import TYPE_CHECKING, Self
34
from tinygrad.uop import Ops
45
from tinygrad.helpers import prod, argfix, flatten, dedup, make_tuple, ceildiv
56
from tinygrad.uop.ops import resolve, smax
67

78
if TYPE_CHECKING:
8-
from tinygrad.uop.ops import UOp
9-
sint: TypeAlias = "UOp | int"
9+
from tinygrad.uop.ops import sint
1010

1111

1212
def _align_left(*shapes: tuple[sint, ...]) -> tuple[tuple[sint, ...], ...]:

0 commit comments

Comments
 (0)