Skip to content

Commit

Permalink
docs updated, code coverage fix
Browse files Browse the repository at this point in the history
  • Loading branch information
igorbenav committed May 10, 2024
1 parent 989eb6d commit 9ae1f78
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ The Changelog documents all notable changes made to FastCRUD. This includes new

___

## [0.12.1] - May 10, 2024

#### Added
- Deprecation Warning for dependency handling.

#### Detailed Changes
If you pass a sequence of `params.Depends` type variables to any `*_deps` parameter in `EndpointCreator` and `crud_router`, you'll get a warning. Support will be completely removed in 0.15.0.

**Full Changelog**: https://github.com/igorbenav/fastcrud/compare/v0.12.0...v0.12.1


## [0.12.0] - May 8, 2024

#### Added
Expand Down
4 changes: 2 additions & 2 deletions fastcrud/endpoint/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _extract_unique_columns(

def _temporary_dependency_handling(
funcs: Optional[Sequence[Callable]] = None,
) -> Union[Sequence[params.Depends], None]:
) -> Union[Sequence[params.Depends], None]: # pragma: no cover
"""
Checks if any function in the provided sequence is an instance of params.Depends.
Issues a deprecation warning once if such instances are found, and returns the sequence if any params.Depends are found.
Expand All @@ -111,7 +111,7 @@ def _inject_dependencies(
) -> Optional[Sequence[params.Depends]]:
"""Wraps a list of functions in FastAPI's Depends."""
temp_handling = _temporary_dependency_handling(funcs)
if temp_handling is not None:
if temp_handling is not None: # pragma: no cover
return temp_handling

if funcs is not None:
Expand Down

0 comments on commit 9ae1f78

Please sign in to comment.