Skip to content

Commit 5deb92d

Browse files
authored
Revert "Fix Python 3.9 typing error in tools/compile (#4946)" (#5322)
This reverts commit 6db18fb. Since we no longer support python 3.9, we can move to the new style of type hints.
1 parent 28f73c5 commit 5deb92d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/triton/tools/compile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from argparse import ArgumentParser
66
from dataclasses import dataclass
77
from pathlib import Path
8-
from typing import List, Optional
8+
from typing import List
99

1010
import triton
1111
from triton._internal_testing import is_xpu
@@ -23,12 +23,12 @@ class CompileArgs:
2323
grid: str = ''
2424
grf_mode: str = ''
2525
generate_native_code: bool = False
26-
target: Optional[str] = None
26+
target: str | None = None
2727
num_warps: int = 1
2828
threads_per_warp: int = 32
2929
num_stages: int = 3
30-
out_name: Optional[str] = None
31-
out_path: Optional[Path] = None
30+
out_name: str | None = None
31+
out_path: Path | None = None
3232

3333

3434
desc = """

0 commit comments

Comments
 (0)