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:
Jon Dufresne 2018-12-15 11:47:08 -08:00
parent 6113261948
commit 5b2bf19685

View File

@ -152,8 +152,6 @@ class path(text_type):
""" """
Writes the given `text` to the file. Writes the given `text` to the file.
""" """
if isinstance(text, bytes):
text = text.decode(encoding)
with open(self, 'w', encoding=encoding, **kwargs) as f: with open(self, 'w', encoding=encoding, **kwargs) as f:
f.write(text) f.write(text)