Skip to content
Myr

Reversed logic, pick the long ones before the short ones

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

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:click/core.py+1 added-1 removed
908 unmodified lines
909 opts.append(decl)910911 if name is None and possible_names:912 possible_names.sort(key=lambda x: len(x[0]))913 name = possible_names[0][1].replace('-', '_')913 name = possible_names[-1][1].replace('-', '_')914 if not isidentifier(name):915 name = None916917 if name is None:
151 unmodified lines