Skip to content
Myr

repr for BaseCommand and Parameter

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by David Lord · committed by David Lord · parent 870d325 · Browse files · 2 files+8 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−5 removed

  • other:+8 added−5 removed

2 files+8 added−5 removed

modified:click/core.py+6 added-3 removed
620 unmodified lines
621 context_settings = {}622 #: an optional dictionary with defaults passed to the context.623 self.context_settings = context_settings624625 def __repr__(self):626 return "<%s %s>" % (self.__class__.__name__, self.name)627628 def get_usage(self, ctx):629 raise NotImplementedError('Base commands cannot get usage')630631 def get_help(self, ctx):
202 unmodified lines
834 self.no_args_is_help = no_args_is_help835 self.hidden = hidden836 self.deprecated = deprecated837835 def __repr__(self):836 return '<%s %s>' % (self.__class__.__name__, self.name)837838 def get_usage(self, ctx):839 """Formats the usage line into a string and returns it.840841 Calls :meth:`format_usage` internally.
553 unmodified lines
1395 self.metavar = metavar1396 self.envvar = envvar1397 self.autocompletion = autocompletion13981399 def __repr__(self):1400 return "<%s %s>" % (self.__class__.__name__, self.name)14011402 @property1403 def human_readable_name(self):1404 """Returns the human readable name of this parameter. This is the1405 same as the name for options, but the metavar for arguments.
496 unmodified lines
modified:CHANGES.rst+2 added-2 removed
56 unmodified lines
57 ``click.edit()``. :pr:`1469`58- Arguments to system calls such as the executable path passed to59 ``click.edit`` can contains spaces. :pr:`1470`60- Add ZSH completion autoloading and error handling. :issue:`1348`61- Add a repr to ``Command``, showing the command name for friendlier62 debugging. :issue:`1267`61- Add a repr to ``Command``, ``Group``, ``Option``, and ``Argument``,62 showing the name for friendlier debugging. :issue:`1267`636465Version 7.066-----------
540 unmodified lines