Skip to content

Commit

Permalink
Expand the docstring for on_interrupt to explain where it might be us…
Browse files Browse the repository at this point in the history
…eful.
  • Loading branch information
jaraco committed Jul 26, 2024
1 parent 4c4579a commit be4f963
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jaraco/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ class suppress(contextlib.suppress, contextlib.ContextDecorator):

class on_interrupt(contextlib.ContextDecorator):
"""
Replace a KeyboardInterrupt with SystemExit(1)
Replace a KeyboardInterrupt with SystemExit(1).
Useful in conjunction with console entry point functions.
>>> def do_interrupt():
... raise KeyboardInterrupt()
Expand Down

0 comments on commit be4f963

Please sign in to comment.