diff --git a/cli-v1-to-v2 b/cli-v1-to-v2 index 91f01d5..904d50e 100755 --- a/cli-v1-to-v2 +++ b/cli-v1-to-v2 @@ -129,7 +129,7 @@ def _pointer_type_literal(source): def _slice_types(source): return _subfmt( '&cli\\.(?PIntSlice|StringSlice){(?P[^}]*)}', - 'cli.New{type}({args})', source, flags=re.DOTALL|re.UNICODE + 'cli.New{type}({args})', source, flags=re.DOTALL | re.UNICODE ) @@ -159,7 +159,7 @@ def _bool_t_flag(source): return _subfmt( 'cli\\.BoolTFlag{(?P[^}]*)}', 'cli.BoolFlag{{Value: true,{args}}}', - source, flags=re.DOTALL|re.UNICODE + source, flags=re.DOTALL | re.UNICODE ) @@ -278,9 +278,9 @@ def _context_bool_t(source): @_migrator def _context_global_methods(source): return _subfmt( - '\\.Global(?P' \ - 'Bool|Duration|Float64|Generic|Int|IntSlice|String|StringSlice|' \ - 'FlagNames|IsSet|Set' \ + '\\.Global(?P' + 'Bool|Duration|Float64|Generic|Int|IntSlice|String|StringSlice|' + 'FlagNames|IsSet|Set' ')\\(', '.{method}(', source )