Skip to content

Commit

Permalink
Fix incorrect type in misc/test_case_to_actual.py test case (#13452)
Browse files Browse the repository at this point in the history
  • Loading branch information
kkirsche authored Aug 19, 2022
1 parent 7d95e2e commit 4a7d0c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions misc/test_case_to_actual.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ def normalize(lines: Iterator[str]) -> Iterator[str]:


def produce_chunks(lines: Iterator[str]) -> Iterator[Chunk]:
current_chunk: Chunk = None
current_chunk: Chunk | None = None
for line in normalize(lines):
if is_header(line):
if current_chunk is not None:
yield current_chunk
parts = line[1:-1].split(" ", 1)
args = parts[1] if len(parts) > 1 else ""
current_chunk = Chunk(parts[0], args)
else:
elif current_chunk is not None:
current_chunk.lines.append(line)
if current_chunk is not None:
yield current_chunk
Expand Down

0 comments on commit 4a7d0c8

Please sign in to comment.