Skip to content
Myr

Entering a context multiple times defers the cleanup.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 847fcbc · Browse files · 2 files+7 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+7 added−1 removed

  • other:+7 added−1 removed

2 files+7 added−1 removed

modified:click/core.py+5 added-1 removed
235 unmodified lines
236 self.auto_envvar_prefix = auto_envvar_prefix.upper()237 self.auto_envvar_prefix = auto_envvar_prefix238239 self._close_callbacks = []240 self._depth = 0241242 def __enter__(self):243 self._depth += 1244 return self245246 def __exit__(self, exc_type, exc_value, tb):247 self._depth -= 1248 if self._depth == 0:245 self.close()249 self.close()250251 def _get_invoked_subcommand(self):252 """This flag indicates if a subcommand is going to be executed. A253 group callback can use this information to figure out if it's
1240 unmodified lines
modified:CHANGES+2 added
30 unmodified lines
31 method on a Click command to be able to handle errors better.32- added support for returning values from command callbacks.33- added simplifications for printing to stderr from `echo`.34- added result callbacks for groups.35- entering a context multiple times defers the cleanup until36 the last exit occurs.3738Version 2.639-----------40
111 unmodified lines