File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change 2222# Tracing flags
2323TRACE = False
2424
25+ try :
26+ # Introduced in click 8.3.0 to have a sentinel value
27+ # (https://peps.python.org/pep-0661/) for flag values
28+ # and default values instead of None to differentiate
29+ # between explicitly setting a `None` value and
30+ # not setting and value.
31+ # See https://github.com/pallets/click/pull/3030 and
32+ # https://github.com/pallets/click/releases/tag/8.3.0
33+ from click .core import UNSET
34+ except ImportError :
35+ # to maintain compatibility with click < 8.3.0
36+ UNSET = None
37+
2538
2639def logger_debug (* args ):
2740 pass
@@ -429,7 +442,7 @@ def __init__(
429442 confirmation_prompt = False ,
430443 hide_input = False ,
431444 is_flag = None ,
432- flag_value = None ,
445+ flag_value = UNSET ,
433446 multiple = False ,
434447 count = False ,
435448 allow_from_autoenv = True ,
You can’t perform that action at this time.
0 commit comments