Skip to content

fix: inject positional-only loggers by argument index - #169

Open
Shubham-Padkonde wants to merge 1 commit into
github:mainfrom
Shubham-Padkonde:fix/positional-only-logger
Open

Shubham-Padkonde wants to merge 1 commit into
github:mainfrom
Shubham-Padkonde:fix/positional-only-logger

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Fixes #166. Functions that declare annotated_logger before / currently receive it as a keyword, raising TypeError; methods and provided loggers can instead fail with KeyError during injection.

Choose positional injection when the logger parameter itself is positional-only. Add regressions for a function with a default argument, an instance method, and a caller-supplied logger. Bump the patch version as required by the contribution guide.

Validation: all 79 tests pass with 100% coverage; ruff and pyright pass; git diff --check passes. The three regression tests reproduce the injection failures before the fix.

Copilot AI balanced review requested due to automatic review settings October 2, 2026 06:38
@Shubham-Padkonde
Shubham-Padkonde requested a review from a team as a code owner October 2, 2026 06:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
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.

Logger injection fails for functions with positional-only parameters

2 participants