fix decorator typing, bump dev dep on litellm #205
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix and speed up mypy type reviews on the observed functions
Note
Tightens typing for observe decorators (sync/async) using generics and overloads, and bumps dev dependency
litellmto>=1.79.1.src/lmnr/sdk/decorators.py):observeto support sync and async callables (Coroutine), refining decorator return types.ParamSpec/TypeVarand updateinput_formatter/output_formattertoCallable[..., str].src/lmnr/opentelemetry_lib/decorators/__init__.py):TypeVar Fbound toCallable[..., Any]and annotate decorator factories to returnCallable[[F], F].Callable[..., str].pyproject.toml):litellmin[dependency-groups].devfrom>=1.77.0to>=1.79.1.Written by Cursor Bugbot for commit bf54efd. This will update automatically on new commits. Configure here.
Important
Improve decorator typing and update
litellmdev dependency version.TypeVarFin__init__.pyfor better type safety in decorators.observe()indecorators.pyto handle sync and async functions separately.observe_base()andasync_observe_base()in__init__.pytoCallable[[F], F].litellmversion from1.77.0to1.79.1inpyproject.toml.This description was created by
for bf54efd. You can customize this summary. It will automatically update as commits are pushed.