Skip to content
Prev Previous commit
Next Next commit
Only parse function names if needed
  • Loading branch information
erlend-aasland committed Feb 2, 2024
commit ea48efad65bb35a50ee214121b2f147a309224af
2 changes: 1 addition & 1 deletion Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5258,10 +5258,10 @@ def state_modulename_name(self, line: str) -> None:
# are we cloning?
before, equals, existing = line.rpartition('=')
if equals:
names = self.parse_function_names(before)
existing = existing.strip()
if is_legal_py_identifier(existing):
# we're cloning!
names = self.parse_function_names(before)
return self.parse_cloned_function(names, existing)

line, _, returns = line.partition('->')
Expand Down