Convert formatting to use ruff instead of yapf + isort (#26247)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
import glob
|
||||
|
||||
requires_files = glob.glob('requirements/*.txt')
|
||||
requires_files = glob.glob("requirements/*.txt")
|
||||
requires_files += ["pyproject.toml"]
|
||||
for file in requires_files:
|
||||
print(f">>> cleaning {file}")
|
||||
@@ -11,11 +11,11 @@ for file in requires_files:
|
||||
lines = f.readlines()
|
||||
if "torch" in "".join(lines).lower():
|
||||
print("removed:")
|
||||
with open(file, 'w') as f:
|
||||
with open(file, "w") as f:
|
||||
for line in lines:
|
||||
if 'torch' not in line.lower():
|
||||
if "torch" not in line.lower():
|
||||
f.write(line)
|
||||
else:
|
||||
print(line.strip())
|
||||
print(f"<<< done cleaning {file}")
|
||||
print()
|
||||
print()
|
||||
|
||||
Reference in New Issue
Block a user