Skip to content

Commit 4a7d0c8

Browse files
authored
Fix incorrect type in misc/test_case_to_actual.py test case (#13452)
1 parent 7d95e2e commit 4a7d0c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

misc/test_case_to_actual.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ def normalize(lines: Iterator[str]) -> Iterator[str]:
2222

2323

2424
def produce_chunks(lines: Iterator[str]) -> Iterator[Chunk]:
25-
current_chunk: Chunk = None
25+
current_chunk: Chunk | None = None
2626
for line in normalize(lines):
2727
if is_header(line):
2828
if current_chunk is not None:
2929
yield current_chunk
3030
parts = line[1:-1].split(" ", 1)
3131
args = parts[1] if len(parts) > 1 else ""
3232
current_chunk = Chunk(parts[0], args)
33-
else:
33+
elif current_chunk is not None:
3434
current_chunk.lines.append(line)
3535
if current_chunk is not None:
3636
yield current_chunk

0 commit comments

Comments
 (0)