Add a @finalize decorator for functions to collect/operate on subroutine results. #140
Open
Description
For symmetry with @initialize
This behavior is mostly currently achievable with result_callback that you can pass to Typer.callback or Typer.group. There are two deficiencies:
- The command must be compound. There's no way to finalize a singular command. This makes sense, but it'd be nice if the interface uniformly worked.
- result_callback is not class aware, so you have to jump through extra hoops to get access to self - namely you need to return it from your subcommands.