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
Apply suggestions from code review
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
corona10 and AlexWaygood authored Dec 13, 2023
commit bc373f6bdc31f9093ace9684a847141d076b32cd
4 changes: 2 additions & 2 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1971,7 +1971,7 @@ def render_function(
full_name = f.full_name
template_dict = {'full_name': full_name}
template_dict['name'] = f.displayname
if f.kind in (GETTER, SETTER):
if f.kind in {GETTER, SETTER}:
template_dict['getset_name'] = f.c_basename.upper()
template_dict['getset_basename'] = f.c_basename
if f.kind is GETTER:
Expand Down Expand Up @@ -5584,7 +5584,7 @@ def state_modulename_name(self, line: str) -> None:
return_converter = None
if returns:
if self.kind in {GETTER, SETTER}:
fail("neither @getter nor @setter can define return type")
fail(f"@{self.kind.name.lower()} methods cannot define a return type")
ast_input = f"def x() -> {returns}: pass"
try:
module_node = ast.parse(ast_input)
Expand Down