mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-141415: Remove unused variables and comment in _pyrepl.windows_console.py (#141416)
This commit is contained in:
parent
759a048d4b
commit
713edbcebf
1 changed files with 0 additions and 13 deletions
|
|
@ -249,22 +249,10 @@ def input_hook(self):
|
||||||
def __write_changed_line(
|
def __write_changed_line(
|
||||||
self, y: int, oldline: str, newline: str, px_coord: int
|
self, y: int, oldline: str, newline: str, px_coord: int
|
||||||
) -> None:
|
) -> 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))
|
minlen = min(wlen(oldline), wlen(newline))
|
||||||
x_pos = 0
|
x_pos = 0
|
||||||
x_coord = 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
|
# 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
|
# encounter an ESCAPE, because it might be the start of an escape
|
||||||
# sequence
|
# sequence
|
||||||
|
|
@ -358,7 +346,6 @@ def prepare(self) -> None:
|
||||||
self.height, self.width = self.getheightwidth()
|
self.height, self.width = self.getheightwidth()
|
||||||
|
|
||||||
self.posxy = 0, 0
|
self.posxy = 0, 0
|
||||||
self.__gone_tall = 0
|
|
||||||
self.__offset = 0
|
self.__offset = 0
|
||||||
|
|
||||||
if self.__vt_support:
|
if self.__vt_support:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue