Skip to content

Conversation

@VegetarianOrc
Copy link
Collaborator

The method_name field should be automatically set by the framework to match the attribute name in service definitions or the method name in operation handlers. Users should not be able to set it directly.

Changes:

  • Add init=False to method_name field in Operation dataclass
  • Update framework code to set method_name after Operation construction
  • Keep validation to catch manual method_name assignment that doesn't match the attribute name
  • Remove test case for duplicate method names via constructor (that specific scenario is no longer possible)
  • Update test expectations to not pass method_name to constructor

The method_name field should be automatically set by the framework to
match the attribute name in service definitions or the method name in
operation handlers. Users should not be able to set it directly.

Changes:
- Add init=False to method_name field in Operation dataclass
- Update framework code to set method_name after Operation construction
- Keep validation to catch manual method_name assignment that doesn't
  match the attribute name
- Remove test case for duplicate method names via constructor (that
  specific scenario is no longer possible)
- Update test expectations to not pass method_name to constructor

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@VegetarianOrc VegetarianOrc marked this pull request as ready for review January 14, 2026 01:22
@VegetarianOrc VegetarianOrc requested a review from a team as a code owner January 14, 2026 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants