# HG changeset patch # User Raphaël Gomès # Date 2019-08-02 14:14:00 # Node ID 5e296f618920911dbd77ef0c40b96a7a3397c89b # Parent f95b59ffc307c4549d9640a81d750a99bd75f423 byteify-strings: simplify default value for `--treat-as-kwargs` diff --git a/contrib/byteify-strings.py b/contrib/byteify-strings.py --- a/contrib/byteify-strings.py +++ b/contrib/byteify-strings.py @@ -276,15 +276,13 @@ def main(): 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: