summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-12-15 11:47:08 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2018-12-15 11:47:08 -0800
commit5b2bf19685d617cb4512e43f3ae23c8948b1554d (patch)
tree876620ab8b3781caebe1e5ec77bb17936fac02d7
parent6113261948523ef6cad74621dec10e0cbf0189c7 (diff)
downloadsphinx-git-5b2bf19685d617cb4512e43f3ae23c8948b1554d.tar.gz
Remove unnecessary bytes type check from path.write_text()
All code passes type str to the method. Per the type signature, only str is allowed.
-rw-r--r--sphinx/testing/path.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/sphinx/testing/path.py b/sphinx/testing/path.py
index 77df1ab9b..56ae27f72 100644
--- a/sphinx/testing/path.py
+++ b/sphinx/testing/path.py
@@ -152,8 +152,6 @@ class path(text_type):
"""
Writes the given `text` to the file.
"""
- if isinstance(text, bytes):
- text = text.decode(encoding)
with open(self, 'w', encoding=encoding, **kwargs) as f:
f.write(text)