Skip to content

Commit

Permalink
Update Tools/clinic/clinic.py
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Waygood <[email protected]>
  • Loading branch information
corona10 and AlexWaygood authored Nov 27, 2023
1 parent 7f4bfa8 commit fe46de0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3056,7 +3056,8 @@ def methoddef_flags(self) -> str | None:
case FunctionKind.STATIC_METHOD:
flags.append('METH_STATIC')
case _ as kind:
assert kind in {FunctionKind.CALLABLE, FunctionKind.GETTER}, f"unknown kind: {kind!r}"
acceptable_kinds = {FunctionKind.CALLABLE, FunctionKind.GETTER}
assert kind in acceptable_kinds, f"unknown kind: {kind!r}"
if self.coexist:
flags.append('METH_COEXIST')
return '|'.join(flags)
Expand Down

0 comments on commit fe46de0

Please sign in to comment.