Skip to content

refactoring: ♻️ replace call with __call__ in asfunction#277

Merged
remimd merged 1 commit intodevfrom
asfunction
Oct 12, 2025
Merged

refactoring: ♻️ replace call with __call__ in asfunction#277
remimd merged 1 commit intodevfrom
asfunction

Conversation

@remimd
Copy link
Copy Markdown
Member

@remimd remimd commented Oct 12, 2025

No description provided.

@remimd remimd requested a review from Copilot October 12, 2025 08:20
@remimd remimd self-assigned this Oct 12, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the asfunction decorator to use the standard __call__ method instead of a custom call method, simplifying the API and improving consistency with Python conventions.

  • Replaced custom AsFunctionCallable protocol with standard Callable type
  • Updated all method calls from call to __call__
  • Simplified type definitions and removed unnecessary protocol abstractions

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
injection/_core/asfunction.py Removes custom protocol, updates type hints, and changes method calls to use __call__
tests/core/test_asfunction.py Updates test classes to use __call__ instead of call method
documentation/integrations/unlisted-framework.md Updates documentation examples to show __call__ usage

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread injection/_core/asfunction.py
@remimd remimd merged commit 547841e into dev Oct 12, 2025
6 checks passed
@remimd remimd deleted the asfunction branch October 12, 2025 08: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