Fix bug introduced in #3564. (#3615)

This commit is contained in:
Yilei "Dolee" Yang 2023-03-19 07:43:39 -07:00 committed by GitHub
parent d7a28dd786
commit dba3c2695c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -598,7 +598,7 @@ def _maybe_empty_lines(self, current_line: Line) -> Tuple[int, int]:
before = 1
elif (
not depth
and self.previous_defs[-1]
and self.previous_defs[-1].depth
and current_line.leaves[-1].type == token.COLON
and (
current_line.leaves[0].value