Skip to content
Myr

Removed some more dead code

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

authored by Armin Ronacher · committed by Armin Ronacher · parent 0c43d5a · Browse files · 1 file+2 added−7 removed
This commit

State

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

Diff stats

1 file+2 added−7 removed

  • other:+2 added−7 removed

1 file+2 added−7 removed

modified:click/parser.py+2 added-7 removed
18 unmodified lines
192021class Option(object):22 ATTRS = ['action', 'type', 'dest', 'nargs', 'const']23 ACTIONS = ('store', 'store_const', 'append', 'append_const')24 STORE_ACTIONS = ('store', 'store_const', 'append', 'append_const')23 TYPED_ACTIONS = ('store', 'append')24 TAKES_VALUE_ACTIONS = ('store', 'append')27 CONST_ACTIONS = ('store_const', 'append_const')2526 def __init__(self, *opts, **attrs):27 self._short_opts = []28 self._long_opts = []
5 unmodified lines
34 self._short_opts.append(opt)3536 for attr in self.ATTRS:37 if attr in attrs:41 setattr(self, attr, attrs[attr])42 del attrs[attr]38 setattr(self, attr, attrs.pop(attr))39 else:40 setattr(self, attr, None)4142 if attrs:43 attrs = sorted(attrs.keys())44 raise TypeError('invalid keyword arguments: %s' % ', '.join(attrs))45
24 unmodified lines
7071 def __init__(self, ctx):72 self.ctx = ctx73 self.allow_interspersed_args = True77 self.option_list = []74 self._short_opt = {}75 self._long_opt = {}76 self.rargs = None77 self.largs = None
8 unmodified lines
86 raise TypeError('not an Option instance: %r' % option)87 else:88 raise TypeError('invalid arguments')8994 self.option_list.append(option)90 option.container = self91 for opt in option._short_opts:92 self._short_opt[opt] = option93 for opt in option._long_opts:
158 unmodified lines