8000 gh-112205: Support @getter annotation from AC by corona10 · Pull Request #112396 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-112205: Support @getter annotation from AC #112396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Nov 30, 2023
Merged
Prev Previous commit
Next Next commit
Update Tools/clinic/clinic.py
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
  • Loading branch information
corona10 and AlexWaygood authored Nov 25, 2023
commit e0fb271e704c0a7a0b1f253e2af8689359c237f0
5 changes: 4 additions & 1 deletion Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -5458,7 +5458,10 @@ def update_function_kind(self, fullname: str) -> None:
if (self.kind is CALLABLE) and cls and not self.getter:
self.kind = METHOD_INIT
else:
fail("'__init__' must be a normal method, not a class or static method!")
fail(
"'__init__' must be a normal method, "
"not a classmethod, staticmethod or getter!"
)
elif self.getter and cls:
self.kind = GETTER

Expand Down
0