Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Commit

Permalink
Update README and add changelog.
Browse files Browse the repository at this point in the history
  • Loading branch information
omegatrix committed Aug 27, 2022
1 parent a8da906 commit 9a2adda
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

<a id='changelog-1.0.0'></a>
# 1.0.0 — 2022-08-27

## Added

- Added class based `Try` error handler.
- 100% code coverage.
- Code coverage reporting to `tox`.
- `CI` through `GitHub` action that runs `tox` automatically.
- `Codecov` integration.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![PyPI version](https://badge.fury.io/py/trycatch.svg)](https://badge.fury.io/py/trycatch)
[![trycatch CI](https://github.com/omegatrix/trycatch/actions/workflows/build.yaml/badge.svg)](https://github.com/omegatrix/trycatch/actions/workflows/build.yaml)
[![codecov](https://codecov.io/gh/omegatrix/trycatch/branch/main/graph/badge.svg?token=CFPSLDWJ0Q)](https://codecov.io/gh/omegatrix/trycatch)
[![codecov](https://codecov.io/gh/omegatrix/trycatch/branch/main/graph/badge.svg?token=2M0QOSUPM0)](https://codecov.io/gh/omegatrix/trycatch)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/trycatch)

## Installation
Expand Down
10 changes: 5 additions & 5 deletions src/trycatch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
`try except` wrapper.
Example:
from typeguard import Try
from trycatch import Try
"""

__version__ = "1.0.0"
Expand Down Expand Up @@ -52,7 +52,7 @@ def catch(
Args:
*exceptions (Type[Exception]): Variable length exceptions
to guard against.
to catch.
Returns:
If no exception occurs, a `Tuple` of `(None, Value)`
Expand All @@ -77,18 +77,18 @@ async def async_catch(
self,
*exceptions: Type[Exception],
) -> Awaitable[Union[Tuple[Type[Exception], None], Tuple[None, T]]]:
"""Catches provided exceptions if any occurs, Async version of `catch`.
"""Catches provided exceptions if any occurs. Async version of `catch`.
Args:
*exceptions (Type[Exception]): Variable length exceptions
to guard against.
to catch.
Returns:
If no exception occurs, a `Tuple` of `(None, Value)`
will be returned. Otherwise a `Tuple` of `(Exception, None)`
will be returned. These can be accesses such as:
`err, val = await Try(fetch).async_guard(HttpError)`
`err, val = await Try(fetch).async_catch(HttpError)`
Raises:
TypeError: If no exceptions provided.
Expand Down

0 comments on commit 9a2adda

Please sign in to comment.