Skip to content

Commit

Permalink
improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
orsinium committed Jul 6, 2019
1 parent 4ca42f3 commit 7ee5dd6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ That's nice `assert` statements in decorators style to validate function input,

## Available decorators

CLassic DbC:

* `@deal.pre` -- validate function arguments (pre-condition)
* `@deal.post` -- validate function return value (post-condition)
* `@deal.inv` -- validate object internal state (invariant)

Take more control:

* `@deal.offline` -- forbid network requests
* `@deal.raises` -- allow only list of exceptions
* `@deal.safe` -- forbid exceptions
* `@deal.silent` -- forbid output into stderr/stdout.

## Installation

```bash
Expand Down Expand Up @@ -73,3 +86,5 @@ p = Post()
p.visits = -1
# InvContractError:
```

Dive deeper on [deal.readthedocs.io](https://deal.readthedocs.io/).

0 comments on commit 7ee5dd6

Please sign in to comment.