From bafda5103ffe512e914adf6e2fb75b1a9ca943be Mon Sep 17 00:00:00 2001 From: Nikita Shulga Date: Sat, 9 Dec 2023 08:37:00 -0800 Subject: [PATCH] Add `aarch64_linux` to the list of linted files --- .lintrunner.toml | 2 +- aarch64_linux/build_aarch64_wheel.py | 2 +- aarch64_linux/embed_library.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.lintrunner.toml b/.lintrunner.toml index b7375092a..7d48258bc 100644 --- a/.lintrunner.toml +++ b/.lintrunner.toml @@ -2,7 +2,7 @@ merge_base_with = "origin/main" [[linter]] code = 'RUFF' -include_patterns = ['test/smoke_test/*.py', 's3_management/*.py'] +include_patterns = ['test/smoke_test/*.py', 's3_management/*.py', 'aarch64_linux/*.py'] command = [ 'python3', 'tools/linter/adapters/ruff_linter.py', diff --git a/aarch64_linux/build_aarch64_wheel.py b/aarch64_linux/build_aarch64_wheel.py index d4fa6f8ad..333b8b910 100755 --- a/aarch64_linux/build_aarch64_wheel.py +++ b/aarch64_linux/build_aarch64_wheel.py @@ -301,7 +301,7 @@ def build_torchvision(host: RemoteHost, *, # Remove .so files to force static linking host.run_cmd("rm miniforge3/lib/libpng.so miniforge3/lib/libpng16.so miniforge3/lib/libjpeg.so") # And patch setup.py to include libz dependency for libpng - host.run_cmd(['sed -i -e \'s/image_link_flags\.append("png")/image_link_flags += ["png", "z"]/\' vision/setup.py']) + host.run_cmd(['sed -i -e \'s/image_link_flags\\.append("png")/image_link_flags += ["png", "z"]/\' vision/setup.py']) build_vars = "" if branch == "nightly": diff --git a/aarch64_linux/embed_library.py b/aarch64_linux/embed_library.py index 978970d45..1a3114823 100644 --- a/aarch64_linux/embed_library.py +++ b/aarch64_linux/embed_library.py @@ -13,7 +13,7 @@ def replace_tag(filename): - with open(filename, 'r') as f: + with open(filename) as f: lines = f.read().split("\\n") for i,line in enumerate(lines): if not line.startswith("Tag: "):