Skip to content

Commit

Permalink
Fixed docstring formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
umarbutler committed Jun 10, 2024
1 parent 39f75a2 commit b183642
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## Changelog 🔄
All notable changes to `persist-cache` will be documented here. This project adheres to [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.4.1] - 2024-06-10
### Fixed
- Fixed the formatting of the docstring of `cache()` because a portion of it was being rendered by Vscode as a single line instead of a bullet point list.

## [0.4.0] - 2024-05-06
## Added
- Added support for the caching of both synchronous and asynchronous generator functions.
Expand Down Expand Up @@ -43,6 +47,7 @@ All notable changes to `persist-cache` will be documented here. This project adh
### Added
- Added the `cache()` decorator, which locally and persistently caches functions.

[0.4.0]: https://github.com/umarbutler/persist-cache/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/umarbutler/persist-cache/compare/v0.3.2...v0.4.0
[0.3.2]: https://github.com/umarbutler/persist-cache/compare/v0.3.1...v0.3.2
[0.3.1]: https://github.com/umarbutler/persist-cache/compare/v0.3.0...v0.3.1
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "persist-cache"
version = "0.4.0"
version = "0.4.1"
authors = [
{name="Umar Butler", email="[email protected]"},
]
Expand Down
9 changes: 5 additions & 4 deletions src/persist_cache/persist_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ def cache(
Returns:
`Callable`: If `cache()` is called with arguments, a decorator that wraps the function to be cached, otherwise, the wrapped function itself. Once wrapped, the function will have the following methods attached to it:
- `set_expiry(value: int | float | timedelta) -> None`: Set the expiry of the cache.
- `flush_cache() -> None`: Flush out any expired cached returns.
- `clear_cache() -> None`: Clear out all cached returns.
- `delete_cache() -> None`: Delete the cache."""
- `set_expiry(value: int | float | timedelta) -> None`: Set the expiry of the cache.
- `flush_cache() -> None`: Flush out any expired cached returns.
- `clear_cache() -> None`: Clear out all cached returns.
- `delete_cache() -> None`: Delete the cache."""

def decorator(func: Callable) -> Callable:
nonlocal name, dir, expiry
Expand Down

0 comments on commit b183642

Please sign in to comment.