Mercurial > hg-stable
changeset 42706:5e296f618920
byteify-strings: simplify default value for `--treat-as-kwargs`
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Fri, 02 Aug 2019 16:14:00 +0200 |
parents | f95b59ffc307 |
children | bbb002b378f3 |
files | contrib/byteify-strings.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/byteify-strings.py Fri Aug 02 10:18:22 2019 +0200 +++ b/contrib/byteify-strings.py Fri Aug 02 16:14:00 2019 +0200 @@ -276,15 +276,13 @@ help='edit files in place') ap.add_argument('--dictiter', action='store_true', default=False, help='rewrite iteritems() and itervalues()'), - ap.add_argument('--treat-as-kwargs', nargs="+", + ap.add_argument('--treat-as-kwargs', nargs="+", default=[], help="ignore kwargs-like objects"), ap.add_argument('files', metavar='FILE', nargs='+', help='source file') args = ap.parse_args() opts = { 'dictiter': args.dictiter, - 'treat-as-kwargs': set( - args.treat_as_kwargs - ) if args.treat_as_kwargs else set() + 'treat-as-kwargs': set(args.treat_as_kwargs), } for fname in args.files: if args.inplace: