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/).
14
14
15
15
- Remove explicit reference to ` click.BaseCommand ` and ` click.MultiCommand ` objects in anticipation of their deprecation. (Pull #82 )
16
16
- Properly ensure whitespace is trimmed from the usage string. (Pull #83 )
17
+ - Propagate ` context_settings ` to ` click.Context ` -like objects. (Pull #79 )
17
18
18
19
## 0.8.1 - 2023-09-18
19
20
Original file line number Diff line number Diff line change @@ -92,8 +92,12 @@ def _recursively_make_command_docs(
92
92
def _build_command_context (
93
93
prog_name : str , command : click .Command , parent : click .Context | None
94
94
) -> 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 ,
97
101
)
98
102
99
103
@@ -368,11 +372,6 @@ def _make_subcommands_links(
368
372
yield ""
369
373
370
374
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
-
376
375
def _is_command_group (command : click .Command ) -> bool :
377
376
# https://github.com/pallets/click/blob/8.1.8/src/click/core.py#L1806-L1811
378
377
return isinstance (command , click .Group ) or hasattr (command , "command_class" )
You can’t perform that action at this time.
0 commit comments