Skip to content

Commit

Permalink
document half open
Browse files Browse the repository at this point in the history
  • Loading branch information
hauntsaninja committed Nov 29, 2021
1 parent 5a63aec commit b0872cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/black/trans.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,7 @@ def _get_max_string_length(self, line: Line, string_idx: int) -> int:
def iter_fexpr_spans(s: str) -> Iterator[Tuple[int, int]]:
"""
Yields spans corresponding to expressions in a given f-string.
Spans are half-open ranges (left inclusive, right exclusive).
Assumes the input string is a valid f-string.
"""
stack: List[int] = [] # our curly paren stack
Expand Down

0 comments on commit b0872cd

Please sign in to comment.