mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
[upstream_util, wpiutil] Refactor python scripts (#4614)
Co-authored-by: Sourcery AI <> Co-authored-by: Vasista Vovveti <vasistavovveti@gmail.com> Co-authored-by: David Vo <auscompgeek@users.noreply.github.com>
This commit is contained in:
@@ -126,12 +126,12 @@ def overwrite_files(wpiutil_files, llvm_files):
|
||||
|
||||
for wpi_file in wpiutil_files:
|
||||
wpi_base_name = os.path.basename(wpi_file)
|
||||
if wpi_base_name not in llvm_files:
|
||||
if wpi_base_name not in unmatched_files_whitelist:
|
||||
print(f"No file match for {wpi_file}, check if LLVM deleted it")
|
||||
else:
|
||||
if wpi_base_name in llvm_files:
|
||||
shutil.copyfile(llvm_files[wpi_base_name], wpi_file)
|
||||
|
||||
elif wpi_base_name not in unmatched_files_whitelist:
|
||||
print(f"No file match for {wpi_file}, check if LLVM deleted it")
|
||||
|
||||
|
||||
def overwrite_source(wpiutil_root, llvm_root):
|
||||
llvm_files = flattened_llvm_files(
|
||||
|
||||
Reference in New Issue
Block a user