Skip to content

Commit

Permalink
Make autodoc to generate docs for retry_always()/retry_never()
Browse files Browse the repository at this point in the history
  • Loading branch information
sir-sigurd committed Apr 13, 2020
1 parent ea09cca commit 1146fda
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tenacity/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,20 @@ def __or__(self, other):


class _retry_never(retry_base):
"""Retry strategy that never rejects any result."""

def __call__(self, retry_state):
return False


#: Retry strategy that never rejects any result.
retry_never = _retry_never()


class _retry_always(retry_base):
"""Retry strategy that always rejects any result."""

def __call__(self, retry_state):
return True


#: Retry strategy that always rejects any result.
retry_always = _retry_always()


Expand Down

0 comments on commit 1146fda

Please sign in to comment.