From 077f65f48872cb11f6226aee6735dc9b5d0d6b54 Mon Sep 17 00:00:00 2001 From: Kenneth Daily Date: Mon, 23 Dec 2024 09:55:10 -0800 Subject: [PATCH] Run ruff check --fix --- scripts/install | 1 - scripts/regenerate-lock-files | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 8f825eb62ac7..6875a3af0bb0 100755 --- a/scripts/install +++ b/scripts/install @@ -3,7 +3,6 @@ # which doesn't have argparse. Given that argparse is # a dependency that eventually gets installed, we could # try to bootstrap, but using optparse is just easier. -from __future__ import print_function import optparse import os diff --git a/scripts/regenerate-lock-files b/scripts/regenerate-lock-files index 56554c1e1542..4ce278cf7cf3 100755 --- a/scripts/regenerate-lock-files +++ b/scripts/regenerate-lock-files @@ -93,7 +93,7 @@ class LockFileBuilder: def _overwrite_paths(self, output_path: Path): rel_output_path = os.path.relpath(output_path, self.build_directory) - with open(output_path, "r") as f: + with open(output_path) as f: content = f.read() # Overwrite absolute path in --output-file argument. content = content.replace(str(output_path), str(rel_output_path)) @@ -119,7 +119,7 @@ def show_files(build_directory: Path, include_sdist: bool, include_base: bool): def show_file(path: Path): print(path) - with open(path, 'r') as f: + with open(path) as f: print(f.read())