From 36de6e6a4703de9eb48627273e08014bb6fc83be Mon Sep 17 00:00:00 2001 From: Pierre Sassoulas Date: Tue, 11 Jun 2024 09:24:19 +0200 Subject: [PATCH] Apply pyupgrade automatically --- src/_pytest/cacheprovider.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_pytest/cacheprovider.py b/src/_pytest/cacheprovider.py index 7e00135a4..8ad36f9b9 100755 --- a/src/_pytest/cacheprovider.py +++ b/src/_pytest/cacheprovider.py @@ -221,9 +221,9 @@ class Cache: os.umask(umask) path.chmod(0o777 - umask) - with open(path.joinpath("README.md"), "xt", encoding="UTF-8") as f: + with open(path.joinpath("README.md"), "x", encoding="UTF-8") as f: f.write(README_CONTENT) - with open(path.joinpath(".gitignore"), "xt", encoding="UTF-8") as f: + with open(path.joinpath(".gitignore"), "x", encoding="UTF-8") as f: f.write("# Created by pytest automatically.\n*\n") with open(path.joinpath("CACHEDIR.TAG"), "xb") as f: f.write(CACHEDIR_TAG_CONTENT)