Skip to content

Commit 8a292ed

Browse files
Ben-Regsebastinas
authored andcommitted
Done through line 120
1 parent 3d3a663 commit 8a292ed

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bpython/cli.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
import struct
5353
import sys
5454
import time
55-
from typing import Iterator, NoReturn, List
55+
from typing import Iterator, NoReturn, List, MutableMapping, Any
5656
import unicodedata
5757
from dataclasses import dataclass
5858

@@ -66,7 +66,7 @@
6666
from pygments import format
6767
from pygments.formatters import TerminalFormatter
6868
from pygments.lexers import Python3Lexer
69-
from pygments.token import Token
69+
from pygments.token import Token, _TokenType
7070
from .formatter import BPythonFormatter
7171

7272
# This for config
@@ -100,7 +100,9 @@ class ShowListState:
100100
wl: int = 0
101101

102102

103-
def calculate_screen_lines(tokens, width, cursor=0) -> int:
103+
def calculate_screen_lines(
104+
tokens: MutableMapping[_TokenType, str], width: int, cursor: int = 0
105+
) -> int:
104106
"""Given a stream of tokens and a screen width plus an optional
105107
initial cursor position, return the amount of needed lines on the
106108
screen."""

0 commit comments

Comments
 (0)