Skip to content

Commit 194a21f

Browse files
authored
Enable ruff-pre-commit for third_party/amd (triton-lang#5589)
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 4523d38 commit 194a21f

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repos:
2121
rev: v0.7.1
2222
hooks:
2323
- id: ruff
24-
files: '(^python|^third_party/proton)/.*'
24+
files: '(^python|^third_party/proton|^third_party/amd)/.*'
2525
args: ["--fix", "--exit-non-zero-on-fix"]
2626
exclude: |
2727
(?x)(

third_party/amd/backend/driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class DlPhdrInfo(ctypes.Structure):
3737
# Load libc and get the dl_iterate_phdr symbol.
3838
try:
3939
dl_iterate_phdr = ctypes.CDLL('libc.so.6').dl_iterate_phdr
40-
except:
40+
except Exception:
4141
return None
4242
# argtypes must use c_char_p to accept create_string_buffer.
4343
dl_iterate_phdr.argtypes = [callback_t, c_char_p]

third_party/amd/python/test/test_extract_slice.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import tempfile
2-
3-
import numpy as np
41
import pytest
52
import torch
63

74
import triton
8-
import triton.language as tl
95

106
from triton._internal_testing import is_hip
117

0 commit comments

Comments
 (0)