Skip to content

Commit bacf977

Browse files
committed
moved path normalization logic from list_files() to split_list_arg()
1 parent 797fe4d commit bacf977

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

run-clang-format.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def list_files(files, recursive=False, extensions=None, exclude=None):
7070

7171
out = []
7272
for file in files:
73-
file = file.replace("\\", "")
73+
# file = file.replace("\\", "")
7474
if recursive and os.path.isdir(file):
7575
for dirpath, dnames, fnames in os.walk(file):
7676
fpaths = [os.path.join(dirpath, fname) for fname in fnames]
@@ -254,9 +254,14 @@ def split_list_arg(arg):
254254
if len(arg) == 1:
255255
# split list by regex
256256
paths = re.split(pattern, arg[0])
257-
for path in paths:
258-
# normalize paths by removing forward slashes
259-
path = path.replace("\\", "")
257+
print(paths)
258+
paths = [path.replace("\\","") for path in paths]
259+
# for path in paths:
260+
# print(path)
261+
# # normalize paths by removing forward slashes
262+
# path = path.replace("\\", "dfgdf")
263+
# print(path)
264+
print(paths)
260265
return paths
261266
return arg[0].split() if len(arg) == 1 else arg
262267

0 commit comments

Comments
 (0)