From 02f81c6995db4688baedd3c63e4b9821c090f09c Mon Sep 17 00:00:00 2001 From: "Yilei \"Dolee\" Yang" Date: Fri, 14 Apr 2023 14:05:08 -0700 Subject: [PATCH] Fix two more mypyc issues with mypyc v1.2.0. (#3648) --- src/black/lines.py | 2 +- src/black/nodes.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/black/lines.py b/src/black/lines.py index bf4c12c..9d33bfa 100644 --- a/src/black/lines.py +++ b/src/black/lines.py @@ -790,7 +790,7 @@ def is_line_short_enough( # noqa: C901 # store the leaves that contain parts of the MLS 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): if max_level_to_update == math.inf: had_comma: Optional[int] = None diff --git a/src/black/nodes.py b/src/black/nodes.py index 4e9411b..4507090 100644 --- a/src/black/nodes.py +++ b/src/black/nodes.py @@ -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 which has non-trivial arguments, like arithmetic expressions or function calls. """ - NO: Final = "" - SPACE: Final = " " - DOUBLESPACE: Final = " " + NO: Final[str] = "" + SPACE: Final[str] = " " + DOUBLESPACE: Final[str] = " " t = leaf.type p = leaf.parent v = leaf.value -- 2.39.5