We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
misc/test_case_to_actual.py
1 parent 7d95e2e commit 4a7d0c8Copy full SHA for 4a7d0c8
misc/test_case_to_actual.py
@@ -22,15 +22,15 @@ def normalize(lines: Iterator[str]) -> Iterator[str]:
22
23
24
def produce_chunks(lines: Iterator[str]) -> Iterator[Chunk]:
25
- current_chunk: Chunk = None
+ current_chunk: Chunk | None = None
26
for line in normalize(lines):
27
if is_header(line):
28
if current_chunk is not None:
29
yield current_chunk
30
parts = line[1:-1].split(" ", 1)
31
args = parts[1] if len(parts) > 1 else ""
32
current_chunk = Chunk(parts[0], args)
33
- else:
+ elif current_chunk is not None:
34
current_chunk.lines.append(line)
35
36
0 commit comments