From b93d8d116b7f0986d48257211fd3e27aae407ce9 Mon Sep 17 00:00:00 2001 From: Matthew Price Date: Wed, 13 Sep 2023 13:57:55 +0100 Subject: [PATCH] Remove use of io module --- cloudpathlib/cloudpath.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/cloudpathlib/cloudpath.py b/cloudpathlib/cloudpath.py index 72348bc2..b2241b61 100644 --- a/cloudpathlib/cloudpath.py +++ b/cloudpathlib/cloudpath.py @@ -2,7 +2,6 @@ from collections import defaultdict import collections.abc from contextlib import contextmanager -import io import os from pathlib import ( # type: ignore Path, @@ -637,8 +636,6 @@ def write_text( if not isinstance(data, str): raise TypeError("data must be str, not %s" % data.__class__.__name__) - encoding = io.text_encoding(encoding) - with self.open(mode="w", encoding=encoding, errors=errors, newline=newline) as f: return f.write(data)