Fix two more mypyc issues with mypyc v1.2.0. (#3648)
This commit is contained in:
parent
f265ff5bcd
commit
02f81c6995
@ -790,7 +790,7 @@ def is_line_short_enough( # noqa: C901
|
|||||||
# store the leaves that contain parts of the MLS
|
# store the leaves that contain parts of the MLS
|
||||||
multiline_string_contexts: List[LN] = []
|
multiline_string_contexts: List[LN] = []
|
||||||
|
|
||||||
max_level_to_update = math.inf # track the depth of the MLS
|
max_level_to_update: Union[int, float] = math.inf # track the depth of the MLS
|
||||||
for i, leaf in enumerate(line.leaves):
|
for i, leaf in enumerate(line.leaves):
|
||||||
if max_level_to_update == math.inf:
|
if max_level_to_update == math.inf:
|
||||||
had_comma: Optional[int] = None
|
had_comma: Optional[int] = None
|
||||||
|
@ -181,9 +181,9 @@ def whitespace(leaf: Leaf, *, complex_subscript: bool) -> str: # noqa: C901
|
|||||||
`complex_subscript` signals whether the given leaf is part of a subscription
|
`complex_subscript` signals whether the given leaf is part of a subscription
|
||||||
which has non-trivial arguments, like arithmetic expressions or function calls.
|
which has non-trivial arguments, like arithmetic expressions or function calls.
|
||||||
"""
|
"""
|
||||||
NO: Final = ""
|
NO: Final[str] = ""
|
||||||
SPACE: Final = " "
|
SPACE: Final[str] = " "
|
||||||
DOUBLESPACE: Final = " "
|
DOUBLESPACE: Final[str] = " "
|
||||||
t = leaf.type
|
t = leaf.type
|
||||||
p = leaf.parent
|
p = leaf.parent
|
||||||
v = leaf.value
|
v = leaf.value
|
||||||
|
Loading…
Reference in New Issue
Block a user