]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-141415: Remove unused variables and comment in `_pyrepl.windows_console.py` (...
authorTan Long <tanloong@foxmail.com>
Tue, 11 Nov 2025 19:27:21 +0000 (03:27 +0800)
committerGitHub <noreply@github.com>
Tue, 11 Nov 2025 19:27:21 +0000 (14:27 -0500)
Lib/_pyrepl/windows_console.py

index c56dcd6d7dd434f1c8fa8b2c998eb3888a3a6939..f9f5988af0b9effcf23e84b1e2f42a51a7ae7145 100644 (file)
@@ -249,22 +249,10 @@ class WindowsConsole(Console):
     def __write_changed_line(
         self, y: int, oldline: str, newline: str, px_coord: int
     ) -> None:
-        # this is frustrating; there's no reason to test (say)
-        # self.dch1 inside the loop -- but alternative ways of
-        # structuring this function are equally painful (I'm trying to
-        # avoid writing code generators these days...)
         minlen = min(wlen(oldline), wlen(newline))
         x_pos = 0
         x_coord = 0
 
-        px_pos = 0
-        j = 0
-        for c in oldline:
-            if j >= px_coord:
-                break
-            j += wlen(c)
-            px_pos += 1
-
         # reuse the oldline as much as possible, but stop as soon as we
         # encounter an ESCAPE, because it might be the start of an escape
         # sequence
@@ -358,7 +346,6 @@ class WindowsConsole(Console):
         self.height, self.width = self.getheightwidth()
 
         self.posxy = 0, 0
-        self.__gone_tall = 0
         self.__offset = 0
 
         if self.__vt_support: