Mercurial > public > mercurial-scm > hg
comparison mercurial/fancyopts.py @ 32291:bd872f64a8ba
cleanup: use set literals
We no longer support Python 2.6, so we can now use set literals.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 10 Feb 2017 16:56:29 -0800 |
parents | c6ce11f2ee50 |
children | db8531c45953 |
comparison
equal
deleted
inserted
replaced
32290:2959c3e986e0 | 32291:bd872f64a8ba |
---|---|
12 error, | 12 error, |
13 pycompat, | 13 pycompat, |
14 ) | 14 ) |
15 | 15 |
16 # Set of flags to not apply boolean negation logic on | 16 # Set of flags to not apply boolean negation logic on |
17 nevernegate = set([ | 17 nevernegate = { |
18 # avoid --no-noninteractive | 18 # avoid --no-noninteractive |
19 'noninteractive', | 19 'noninteractive', |
20 # These two flags are special because they cause hg to do one | 20 # These two flags are special because they cause hg to do one |
21 # thing and then exit, and so aren't suitable for use in things | 21 # thing and then exit, and so aren't suitable for use in things |
22 # like aliases anyway. | 22 # like aliases anyway. |
23 'help', | 23 'help', |
24 'version', | 24 'version', |
25 ]) | 25 } |
26 | 26 |
27 def gnugetopt(args, options, longoptions): | 27 def gnugetopt(args, options, longoptions): |
28 """Parse options mostly like getopt.gnu_getopt. | 28 """Parse options mostly like getopt.gnu_getopt. |
29 | 29 |
30 This is different from getopt.gnu_getopt in that an argument of - will | 30 This is different from getopt.gnu_getopt in that an argument of - will |