@property<EOL><INDENT>def signature(self):<DEDENT>
if self.usage is not None:<EOL><INDENT>return self.usage<EOL><DEDENT>params = self.clean_params<EOL>if not params:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>result = []<EOL>for name, param in params.items():<EOL><INDENT>greedy = isinstance(param.annotation, converters._Greedy)<EOL>if param.default is not param.empty:<EOL><INDENT>should_print = param.default if isinstance(param.default, str) else param.default is not None<EOL>if should_print:<EOL><INDENT>result.append('<STR_LIT>' % (name, param.default) if not greedy else<EOL>'<STR_LIT>' % (name, param.default))<EOL>continue<EOL><DEDENT>else:<EOL><INDENT>result.append('<STR_LIT>' % name)<EOL><DEDENT><DEDENT>elif param.kind == param.VAR_POSITIONAL:<EOL><INDENT>result.append('<STR_LIT>' % name)<EOL><DEDENT>elif greedy:<EOL><INDENT>result.append('<STR_LIT>' % name)<EOL><DEDENT>elif self._is_typing_optional(param.annotation):<EOL><INDENT>result.append('<STR_LIT>' % name)<EOL><DEDENT>else:<EOL><INDENT>result.append('<STR_LIT>' % name)<EOL><DEDENT><DEDENT>return '<STR_LIT:U+0020>'.join(result)<EOL>
Returns a POSIX-like signature useful for help command output.