Exits the application with a given exit code. .. versionchanged:: 8.2 Callbacks and context managers registered with :meth:`call_on_close` and :meth:`with_resource` are closed before exiting.
(self, code: int = 0)
| 813 | raise Abort() |
| 814 | |
| 815 | def exit(self, code: int = 0) -> t.NoReturn: |
| 816 | class="st">"""Exits the application with a given exit code. |
| 817 | |
| 818 | .. versionchanged:: 8.2 |
| 819 | Callbacks and context managers registered with :meth:`call_on_close` |
| 820 | and :meth:`with_resource` are closed before exiting. |
| 821 | class="st">""" |
| 822 | self.close() |
| 823 | raise Exit(code) |
| 824 | |
| 825 | def get_usage(self) -> str: |
| 826 | class="st">"""Helper method to get formatted usage string for the current |