Skip to content

Commit 67ec856

Browse files
rickeylevaignas
andauthored
loop over len of to
Co-authored-by: Ignas Anikevicius <[email protected]>
1 parent 6aa8a42 commit 67ec856

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

python/private/py_executable_bazel.bzl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,7 @@ def relative_path(from_, to):
360360
to_parts = to.split("/")
361361

362362
# Strip common leading parts from both paths
363-
# (no while loops in starlark :( )
364-
n = min(len(from_parts), len(to_parts))
365-
for _ in range(n):
363+
for _ in range(len(to)):
366364
if from_parts[0] == to_parts[0]:
367365
from_parts.pop(0)
368366
to_parts.pop(0)

0 commit comments

Comments
 (0)