Skip to content
Myr

Fixed last broken commit

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 b8e766f · Browse files · 1 file+4 added−11 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+4 added−11 removed

  • other:+4 added−11 removed

1 file+4 added−11 removed

modified:click/core.py+4 added-11 removed
13 unmodified lines
1415_missing = object()161718def _cleanup_name(name):19 prefix = name[:1]20 if not prefix.isalnum():21 return name.lstrip(prefix)22 return name232418class Context(object):19 """The context is a special internal object that holds state relevant20 for the script execution at every single level. It's normally invisible21 to commands unless they opt-in to getting access to it.
878 unmodified lines
900 name = decl901 else:902 if '/' in decl:903 first, second = decl.split('/', 1)911 possible_names.append(_cleanup_name(first))904 possible_names.append(split_opt(first))905 opts.append(first)906 secondary_opts.append(second)907 else:915 possible_names.append(_cleanup_name(decl))908 possible_names.append(split_opt(decl))909 opts.append(decl)910911 if name is None and possible_names:919 possible_names.sort(key=lambda x: split_opt(x)[0])920 name = possible_names[-1].replace('-', '_')912 possible_names.sort(key=lambda x: len(x[0]))913 name = possible_names[0][1].replace('-', '_')914 if not isidentifier(name):915 name = None916917 if name is None:
151 unmodified lines