summaryrefslogtreecommitdiff
path: root/src/click/_compat.py
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2020-04-19 23:54:14 -0700
committerDavid Lord <davidism@gmail.com>2020-04-20 07:12:53 -0700
commit9897d81d0830f2048360cbd45993de1b37ce7371 (patch)
tree1ae0d18e075740b808c69167e97583fde9dd55e3 /src/click/_compat.py
parentb444e6355ec50417546f42138bb833d1e9e8b306 (diff)
downloadclick-9897d81d0830f2048360cbd45993de1b37ce7371.tar.gz
f-strings everywhere
Diffstat (limited to 'src/click/_compat.py')
-rw-r--r--src/click/_compat.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/click/_compat.py b/src/click/_compat.py
index 96b0dd8..85568ca 100644
--- a/src/click/_compat.py
+++ b/src/click/_compat.py
@@ -64,7 +64,7 @@ class _NonClosingTextIOWrapper(io.TextIOWrapper):
errors,
force_readable=False,
force_writable=False,
- **extra
+ **extra,
):
self._stream = stream = _FixupStream(stream, force_readable, force_writable)
super().__init__(stream, encoding, errors, **extra)
@@ -415,7 +415,7 @@ def open_stream(filename, mode="r", encoding=None, errors="strict", atomic=False
while True:
tmp_filename = os.path.join(
os.path.dirname(filename),
- ".__atomic-write{:08x}".format(random.randrange(1 << 32)),
+ f".__atomic-write{random.randrange(1 << 32):08x}",
)
try:
fd = os.open(tmp_filename, flags, 0o666 if perm is None else perm)