Skip to content

Conversation

@remimd
Copy link
Member

@remimd remimd commented Dec 6, 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 improves type annotations in the injection library to eliminate type: ignore comments by using more precise Protocol-based type definitions and better naming conventions for internal types.

Key Changes

  • Converted the _Decorator type from a type alias to a Protocol with generic method signatures, enabling better type checking without requiring type: ignore[type-arg] comments
  • Renamed internal types to follow Python conventions: EntrypointDecorator_EntrypointDecorator (private) and __MODULE_default_module (more pythonic)
  • Updated dependency versions (fastapi, librt, platformdirs) in the lock file

Reviewed changes

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

File Description
uv.lock Updated dependency versions: fastapi 0.123.9→0.123.10, librt 0.6.3→0.7.0, platformdirs 4.5.0→4.5.1
injection/entrypoint.py Renamed EntrypointDecorator to _EntrypointDecorator to mark as internal/private type
injection/_core/asfunction.py Added positional-only parameter marker / to __call__ method for consistency
injection/init.pyi Changed _Decorator from type alias to Protocol, renamed __MODULE to _default_module, removed all type: ignore[type-arg] comments

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

@remimd remimd merged commit e6737cf into dev Dec 6, 2025
12 checks passed
@remimd remimd deleted the typing branch December 6, 2025 10:07
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