Skip to content

Commit 58f81b8

Browse files
committed
Use new ctx API for ParamType
1 parent 066f243 commit 58f81b8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

filesender/log.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def convert(self, value: Union[int, str], param: Union[Parameter, None], ctx: Un
4141

4242
return LogLevel[value].value
4343

44-
def get_metavar(self, param: Parameter, ctx: Union[Context, None] = None) -> Union[str, None]:
44+
@add_ctx_arg
45+
def get_metavar(self, param: Parameter, ctx: Union[Context, None]) -> Union[str, None]:
4546
# Print out the choices
4647
return "|".join(LogLevel._member_map_)

0 commit comments

Comments
 (0)