python: Remove default "r" mode for open().

Generated automatically by pyupgrade.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-08-02 14:19:49 -07:00
committed by Tim Abbott
parent 2bd635853b
commit 1760897a8c
5 changed files with 8 additions and 8 deletions

View File

@@ -18,7 +18,7 @@ PUPPET_THIRDPARTY = os.path.join(PUPPET_MODULES_CACHE_PATH, "current")
def generate_sha1sum_puppet_modules() -> str:
data = {}
with open(PUPPET_DEPS_FILE_PATH, "r") as fb:
with open(PUPPET_DEPS_FILE_PATH) as fb:
data["deps.yaml"] = fb.read().strip()
data["puppet-version"] = subprocess.check_output(
# This is 10x faster than `puppet --version`
@@ -57,7 +57,7 @@ def do_puppet_module_install(
puppet_env["RUBYOPT"] = "-W0"
os.makedirs(target_path, exist_ok=True)
with open(PUPPET_DEPS_FILE_PATH, "r") as yaml_file:
with open(PUPPET_DEPS_FILE_PATH) as yaml_file:
deps = yaml.safe_load(yaml_file)
for module, version in deps.items():
run(