We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3cdc6c9 commit a84136dCopy full SHA for a84136d
1 file changed
pre_commit/util.py
@@ -168,10 +168,10 @@ def __enter__(self) -> Pty:
168
self.r, self.w = openpty()
169
170
# tty flags normally change \n to \r\n
171
- attrs = termios.tcgetattr(self.r)
+ attrs = termios.tcgetattr(self.w)
172
assert isinstance(attrs[1], int)
173
attrs[1] &= ~(termios.ONLCR | termios.OPOST)
174
- termios.tcsetattr(self.r, termios.TCSANOW, attrs)
+ termios.tcsetattr(self.w, termios.TCSANOW, attrs)
175
176
return self
177
0 commit comments