File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 4949else :
5050 SECRET_STORAGE = True
5151
52+ try :
53+ # Sentinel is introduced in click 8.3.
54+ # We need to use it to identify unset values.
55+ _UNSET = click ._utils .Sentinel .UNSET # type: ignore[attr-defined]
56+
57+ def _unset (value : t .Any ) -> bool :
58+ return value is _UNSET or value is None or value == () or value == []
59+
60+ except AttributeError :
61+
62+ def _unset (value : t .Any ) -> bool :
63+ return value is None or value == () or value == []
64+
65+
5266translation = get_translation (__package__ )
5367_ = translation .gettext
5468
@@ -474,7 +488,7 @@ def __init__(
474488 super ().__init__ (* args , ** kwargs )
475489
476490 def process_value (self , ctx : click .Context , value : t .Any ) -> t .Any :
477- if self .needs_plugins and value is not None and value != ( ):
491+ if self .needs_plugins and not _unset ( value ):
478492 pulp_ctx = ctx .find_object (PulpCLIContext )
479493 assert pulp_ctx is not None
480494 for plugin_requirement in self .needs_plugins :
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ classifiers=[
2424]
2525dependencies = [
2626 " pulp-glue==0.37.0.dev" ,
27- " click>=8.0.0,<8.3 " , # Proven to not do semver.
27+ " click>=8.0.0,<8.4 " , # Proven to not do semver.
2828 " PyYAML>=5.3,<6.1" ,
2929 " schema>=0.7.5,<0.8" ,
3030 " tomli>=2.0.0,<2.1;python_version<'3.11'" ,
You can’t perform that action at this time.
0 commit comments