Skip to content

Commit

Permalink
Fix two types to be Optional (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja authored and JelleZijlstra committed Nov 13, 2018
1 parent fbf59b6 commit 5bc62a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions black.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 5bc62a4

Please sign in to comment.