diff --git a/importlib_resources/abc.py b/importlib_resources/abc.py index 7a58dd2..71f4683 100644 --- a/importlib_resources/abc.py +++ b/importlib_resources/abc.py @@ -80,11 +80,13 @@ def read_bytes(self) -> bytes: with self.open('rb') as strm: return strm.read() - def read_text(self, encoding: Optional[str] = None) -> str: + def read_text( + self, encoding: Optional[str] = None, errors: Optional[str] = None + ) -> str: """ Read contents of self as text """ - with self.open(encoding=encoding) as strm: + with self.open(encoding=encoding, errors=errors) as strm: return strm.read() @abc.abstractmethod