diff --git a/rich/_null_file.py b/rich/_null_file.py index 49038bfc..5d5cebc4 100644 --- a/rich/_null_file.py +++ b/rich/_null_file.py @@ -4,19 +4,6 @@ from typing import IO, Iterable, Iterator, List, Optional, Type class NullFile(IO[str]): - # TODO: "mode", "name" and "closed" are only required for Python 3.6. - - @property - def mode(self) -> str: - return "" - - @property - def name(self) -> str: - return "NullFile" - - def closed(self) -> bool: - return False - def close(self) -> None: pass diff --git a/tests/test_null_file.py b/tests/test_null_file.py index 5f11e4f9..001c89bd 100644 --- a/tests/test_null_file.py +++ b/tests/test_null_file.py @@ -5,9 +5,6 @@ def test_null_file(): file = NullFile() with file: assert file.write("abc") == 0 - assert file.mode == "" - assert file.name == "NullFile" - assert not file.closed() assert file.close() is None assert not file.isatty() assert file.read() == ""