Skip to content

Conversation

@remimd
Copy link
Member

@remimd remimd commented Dec 25, 2025

No description provided.

Copy link

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 code organization to improve maintainability and reduce duplication. The changes consolidate metadata creation logic and simplify dependency injection patterns across the codebase.

  • Introduces a centralized _metadata() helper method in the Module class to reduce code duplication
  • Extracts dependency creation logic in FastAPI integration to a separate static method
  • Updates multiple Python dependencies to their latest versions

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
uv.lock Updates multiple dependencies including fastapi (0.124.4 → 0.127.0), jaraco-context (6.0.1 → 6.0.2), jaraco-functools (4.3.0 → 4.4.0), librt (0.7.4 → 0.7.5), mkdocs-material (9.7.0 → 9.7.1), nodeenv (1.9.1 → 1.10.0), and ruff (0.14.9 → 0.14.10)
injection/ext/fastapi.py Refactors dependency creation by extracting __make_dependency() static method and improves naming convention for injected dependencies
injection/_core/module.py Introduces _metadata() helper method to centralize InjectMetadata creation and simplifies multiple methods (make_async_factory, aget_lazy_instance, get_lazy_instance); adds listen() method to InjectMetadata class and applies walrus operator for cleaner conditionals
injection/_core/locator.py Renames parameter from injectable_factory to factory for consistency
injection/_core/asfunction.py Simplifies code by directly calling _metadata() method instead of accessing through make_injected_function()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@remimd remimd changed the title refactor: code organization refactor: improve readability Dec 25, 2025
@remimd remimd changed the title refactor: improve readability refactor: improve internal readability Dec 25, 2025
@remimd remimd merged commit 8ddeb84 into dev Dec 25, 2025
12 checks passed
@remimd remimd deleted the refactor branch December 25, 2025 15:12
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