Skip to content

Commit cca075a

Browse files
committed
Remove unused function
1 parent 9e0feb3 commit cca075a

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

bpython/cli.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -123,24 +123,6 @@ class ShowListState:
123123
wl: int = 0
124124

125125

126-
def calculate_screen_lines(
127-
tokens: MutableMapping[_TokenType, str], width: int, cursor: int = 0
128-
) -> int:
129-
"""Given a stream of tokens and a screen width plus an optional
130-
initial cursor position, return the amount of needed lines on the
131-
screen."""
132-
lines = 1
133-
pos = cursor
134-
for (token, value) in tokens:
135-
if token is Token.Text and value == "\n":
136-
lines += 1
137-
else:
138-
pos += len(value)
139-
lines += pos // width
140-
pos %= width
141-
return lines
142-
143-
144126
def forward_if_not_current(func: F) -> F:
145127
@functools.wraps(func)
146128
def newfunc(self, *args, **kwargs): # type: ignore

0 commit comments

Comments
 (0)