Skip to content

Commit

Permalink
removed commented-out draft code from split_list_arg() and list_files()
Browse files Browse the repository at this point in the history
  • Loading branch information
rjwignar committed Dec 7, 2023
1 parent d4653f9 commit 5b3cd8c
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions run-clang-format.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ def list_files(files, recursive=False, extensions=None, exclude=None):

out = []
for file in files:
# file = file.replace("\\", "")
if recursive and os.path.isdir(file):
for dirpath, dnames, fnames in os.walk(file):
fpaths = [os.path.join(dirpath, fname) for fname in fnames]
Expand Down Expand Up @@ -259,18 +258,6 @@ def split_list_arg(arg):
"""
# pattern matches all whitespaces except those preceded by a backslash, '\'
pattern = r'(?<!\\)\s+'
# if len(arg) == 1:
# # split list by regex
# paths = re.split(pattern, arg[0])
# print(paths)
# paths = normalize_paths(paths)
# # for path in paths:
# # print(path)
# # # normalize paths by removing forward slashes
# # path = path.replace("\\", "dfgdf")
# # print(path)
# print(paths)
# return paths
return normalize_paths(re.split(pattern, arg[0])) if len(arg) == 1 else arg


Expand Down

0 comments on commit 5b3cd8c

Please sign in to comment.