mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #5802 from jdufresne/write-text-bytes
Remove unnecessary bytes type check from path.write_text()
This commit is contained in:
commit
480015c531
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user