Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix warnings
  • Loading branch information
erlend-aasland committed Jul 14, 2023
commit 019edbf256ebce5b2ed414d0a072194afec3ffb0
11 changes: 6 additions & 5 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1736,9 +1736,9 @@ def __init__(
self.find_start_re = create_regex(before, after, whole_line=False)
self.start_re = create_regex(before, after)
self.verify = verify
self.last_checksum_re = None
self.last_dsl_name = None
self.dsl_name = None
self.last_checksum_re: Any = None
self.last_dsl_name: str | None = None
self.dsl_name: str | None = None
self.first_block = True

def __iter__(self):
Expand All @@ -1761,7 +1761,7 @@ def __next__(self) -> Block:
return block


def is_start_line(self, line: str) -> bool:
def is_start_line(self, line: str) -> str | None:
match = self.start_re.match(line.lstrip())
return match.group(1) if match else None

Expand Down Expand Up @@ -1840,7 +1840,8 @@ def is_stop_line(line: str) -> bool:
if self.is_start_line(line):
break

output = output_output()
output: str | None = output_output()
assert isinstance(output, str)
Comment thread
erlend-aasland marked this conversation as resolved.
Outdated
if arguments:
d = {}
for field in shlex.split(arguments):
Expand Down