mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-13 17:02:12 -05:00
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.
This commit is contained in:
1 parent
6113261948
commit
5b2bf19685
1 file changed
-2
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user