summaryrefslogtreecommitdiff
path: root/src/click/_compat.py
diff options
context:
space:
mode:
authorDavid Lord <davidism@gmail.com>2020-03-08 08:57:08 -0700
committerDavid Lord <davidism@gmail.com>2020-03-08 08:57:08 -0700
commit718485be48263056e7036ea9a60ce11b47e2fc26 (patch)
tree0fa1b49ed926f18ab3d247c2cacada892908123a /src/click/_compat.py
parentf8f02bfc63cb6e63b7a3373384758f7226553408 (diff)
downloadclick-718485be48263056e7036ea9a60ce11b47e2fc26.tar.gz
manual cleanup
Diffstat (limited to 'src/click/_compat.py')
-rw-r--r--src/click/_compat.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/click/_compat.py b/src/click/_compat.py
index 38ab8c0..ed57a18 100644
--- a/src/click/_compat.py
+++ b/src/click/_compat.py
@@ -510,7 +510,7 @@ def _wrap_io_open(file, mode, encoding, errors):
if not PY2 or binary:
return io.open(file, mode, **kwargs)
- f = io.open(file, "b" + mode.replace("t", ""))
+ f = io.open(file, "{}b".format(mode.replace("t", "")))
return _make_text_stream(f, **kwargs)
@@ -535,10 +535,10 @@ def open_stream(filename, mode="r", encoding=None, errors="strict", atomic=False
# Some usability stuff for atomic writes
if "a" in mode:
raise ValueError(
- "Appending to an existing file is not supported, because that "
- "would involve an expensive `copy`-operation to a temporary "
- "file. Open the file in normal `w`-mode and copy explicitly "
- "if that's what you're after."
+ "Appending to an existing file is not supported, because that"
+ " would involve an expensive `copy`-operation to a temporary"
+ " file. Open the file in normal `w`-mode and copy explicitly"
+ " if that's what you're after."
)
if "x" in mode:
raise ValueError("Use the `overwrite`-parameter instead.")