Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3cdc6c9 + a84136d commit 9eccd9cCopy full SHA for 9eccd9c
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