Skip to content

refactoring: ♻️ Small changes#266

Merged
remimd merged 1 commit intodevfrom
refactoring
Jun 15, 2025
Merged

refactoring: ♻️ Small changes#266
remimd merged 1 commit intodevfrom
refactoring

Conversation

@remimd
Copy link
Copy Markdown
Member

@remimd remimd commented Jun 15, 2025

No description provided.

@remimd remimd requested a review from Copilot June 15, 2025 09:33
@remimd remimd self-assigned this Jun 15, 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 applies small refactorings to the injection core modules, updates yield‐hint extraction behavior, and tweaks the type stub for inject.

  • Simplify override logic and refactor the on parameter construction in the decorator of module.py
  • Change get_yield_hint to always return a tuple of yielded types and update its annotation
  • Add a blank line in the inject overload in the .pyi stub

Reviewed Changes

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

File Description
injection/_core/module.py Refactored __keep_new_record override logic; adjusted hint/on handling in decorator
injection/_core/common/type.py Rewrote get_yield_hint to return tuples and updated its return type annotation
injection/init.pyi Inserted an extra blank line before the inject overload
Comments suppressed due to low confidence (1)

injection/_core/common/type.py:60

  • The logic now returns an empty tuple (()) for non-generator return types instead of None, changing the API contract. Ensure all callers handle a tuple return and update any downstream code or documentation that expected None.
if get_origin(return_type) in {

Comment thread injection/_core/module.py
@remimd remimd merged commit 45c3a76 into dev Jun 15, 2025
5 checks passed
@remimd remimd deleted the refactoring branch June 15, 2025 09:46
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