diff --git a/cli-v1-to-v2 b/cli-v1-to-v2 index aa83461..b815295 100755 --- a/cli-v1-to-v2 +++ b/cli-v1-to-v2 @@ -236,7 +236,11 @@ def _flag_name_stringly_repl(match): @_migrator def _commands_opaque_type(source): - return re.sub('cli\\.Commands', '[]*cli.Command', source, flags=re.UNICODE) + return _subfmt( + 'cli\\.Commands(?P[^B])', + '[]*cli.Command{suffix}', + source + ) @_migrator