From 5bc62a4a82a4e59ad3bb8e9078b9992396ebfd2f Mon Sep 17 00:00:00 2001 From: hauntsaninja Date: Tue, 13 Nov 2018 15:02:27 -0800 Subject: [PATCH 1/1] Fix two types to be Optional (#607) --- black.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/black.py b/black.py index 9ac16c0..74cf650 100644 --- a/black.py +++ b/black.py @@ -1892,7 +1892,7 @@ def container_of(leaf: Leaf) -> LN: return container -def is_split_after_delimiter(leaf: Leaf, previous: Leaf = None) -> int: +def is_split_after_delimiter(leaf: Leaf, previous: Optional[Leaf] = None) -> int: """Return the priority of the `leaf` delimiter, given a line break after it. The delimiter priorities returned here are from those delimiters that would @@ -1906,7 +1906,7 @@ def is_split_after_delimiter(leaf: Leaf, previous: Leaf = None) -> int: return 0 -def is_split_before_delimiter(leaf: Leaf, previous: Leaf = None) -> int: +def is_split_before_delimiter(leaf: Leaf, previous: Optional[Leaf] = None) -> int: """Return the priority of the `leaf` delimiter, given a line break before it. The delimiter priorities returned here are from those delimiters that would -- 2.39.5