@@ -376,7 +376,7 @@ def get_help_record(self, ctx: click.Context) -> tuple[str, str] | None:
376376 help = f"{ help } { extra_str } " if help else f"{ extra_str } "
377377 return name , help
378378
379- def make_metavar (self , ctx : click .Context | None = None ) -> str :
379+ def make_metavar (self , ctx : click .Context ) -> str :
380380 # Modified version of click.core.Argument.make_metavar()
381381 # to include Argument name
382382 if self .metavar is not None :
@@ -387,8 +387,7 @@ def make_metavar(self, ctx: click.Context | None = None) -> str:
387387 var = (self .name or "" ).upper ()
388388 if not self .required :
389389 var = f"[{ var } ]"
390- type_var = self .type .get_metavar (self , ctx = ctx ) # type: ignore[arg-type]
391- # type_var = self.type.get_metavar(self, ctx=ctx)
390+ type_var = self .type .get_metavar (self , ctx = ctx )
392391 if type_var :
393392 var += f":{ type_var } "
394393 if self .nargs != 1 :
@@ -487,8 +486,8 @@ def _extract_default_help_str(
487486 ) -> Any | Callable [[], Any ] | None :
488487 return _extract_default_help_str (self , ctx = ctx )
489488
490- def make_metavar (self , ctx : click .Context | None = None ) -> str :
491- return super ().make_metavar (ctx = ctx ) # type: ignore[arg-type]
489+ def make_metavar (self , ctx : click .Context ) -> str :
490+ return super ().make_metavar (ctx = ctx )
492491
493492 def get_help_record (self , ctx : click .Context ) -> tuple [str , str ] | None :
494493 # Duplicate all of Click's logic only to modify a single line, to allow boolean
0 commit comments