File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 14
14
"from vllm.triton_utils import tl, triton" ,
15
15
}
16
16
17
+ ALLOWED_FILES = {"vllm/triton_utils/importing.py" }
18
+
19
+
20
+ def is_allowed_file (current_file : str ) -> bool :
21
+ return current_file in ALLOWED_FILES
22
+
17
23
18
24
def is_forbidden_import (line : str ) -> bool :
19
25
stripped = line .strip ()
@@ -25,10 +31,14 @@ def parse_diff(diff: str) -> list[str]:
25
31
violations = []
26
32
current_file = None
27
33
current_lineno = None
34
+ skip_allowed_file = False
28
35
29
36
for line in diff .splitlines ():
30
37
if line .startswith ("+++ b/" ):
31
38
current_file = line [6 :]
39
+ skip_allowed_file = is_allowed_file (current_file )
40
+ elif skip_allowed_file :
41
+ continue
32
42
elif line .startswith ("@@" ):
33
43
match = re .search (r"\+(\d+)" , line )
34
44
if match :
You can’t perform that action at this time.
0 commit comments