File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1414
1515- Remove explicit reference to ` click.BaseCommand ` and ` click.MultiCommand ` objects in anticipation of their deprecation. (Pull #82 )
1616- Properly ensure whitespace is trimmed from the usage string. (Pull #83 )
17+ - Propagate ` context_settings ` to ` click.Context ` -like objects. (Pull #79 )
1718
1819## 0.8.1 - 2023-09-18
1920
Original file line number Diff line number Diff line change @@ -92,8 +92,12 @@ def _recursively_make_command_docs(
9292def _build_command_context (
9393 prog_name : str , command : click .Command , parent : click .Context | None
9494) -> click .Context :
95- return _get_context_class (command )(
96- cast (click .Command , command ), info_name = prog_name , parent = parent
95+ # https://github.com/pallets/click/blob/8.1.8/src/click/core.py#L859-L862
96+ return command .context_class (
97+ cast (click .Command , command ),
98+ info_name = prog_name ,
99+ parent = parent ,
100+ ** command .context_settings ,
97101 )
98102
99103
@@ -368,11 +372,6 @@ def _make_subcommands_links(
368372 yield ""
369373
370374
371- def _get_context_class (command : click .Command ) -> type [click .Context ]:
372- # https://github.com/pallets/click/blob/8.1.8/src/click/core.py#L859-L862
373- return command .context_class
374-
375-
376375def _is_command_group (command : click .Command ) -> bool :
377376 # https://github.com/pallets/click/blob/8.1.8/src/click/core.py#L1806-L1811
378377 return isinstance (command , click .Group ) or hasattr (command , "command_class" )
You can’t perform that action at this time.
0 commit comments