Skip to content

Commit 14f4182

Browse files
committed
refactor(wrap_stdout): remove unused lines
1 parent a70f23b commit 14f4182

File tree

3 files changed

+0
-13
lines changed

3 files changed

+0
-13
lines changed

commitizen/wrap_stdio/linux.py

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
if sys.platform == "linux": # pragma: no cover
44
import os
55

6-
# from io import IOBase
7-
86
class WrapStdinLinux:
97
def __init__(self):
108
fd = os.open("/dev/tty", os.O_RDWR | os.O_NOCTTY)

commitizen/wrap_stdio/unix.py

-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ def __getattr__(self, key):
2626
return "UTF-8"
2727
return getattr(self.tty, key)
2828

29-
def __del__(self):
30-
self.tty.close()
31-
32-
# backup_event_loop = None
3329
backup_event_loop_policy = None
3430
backup_stdin = None
3531
backup_stdout = None

tests/wrap_stdio/test_wrap_stdio.py

-7
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
from commitizen import wrap_stdio
44

5-
# def test_warp_stdio_exists():
6-
# assert hasattr(wrap_stdio_windows, "sys")
7-
# assert hasattr(wrap_stdio_linux, "sys")
8-
# assert hasattr(wrap_stdio_unix, "sys")
9-
10-
115
if sys.platform == "win32": # pragma: no cover
126
pass
137
elif sys.platform == "linux":
@@ -56,7 +50,6 @@ def test_wrap_stdout_linux(mocker):
5650
readerwriter_mock().write.assert_called_with("stderr")
5751

5852
wrap_stdio.unwrap_stdio()
59-
6053
assert sys.stdout == tmp_stdout
6154
assert sys.stderr == tmp_stderr
6255

0 commit comments

Comments
 (0)