From e3a099f7c54fbeaecdf2dc4c774665ac6e33bd0d Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Mon, 30 May 2016 15:24:16 -0400 Subject: [PATCH] Cleanups per flake8 and code review --- .gitignore | 1 - .travis.yml | 2 -- cli-v1-to-v2 | 5 +++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 2a7262d..7823778 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ *.coverprofile -.extracted-examples diff --git a/.travis.yml b/.travis.yml index 550bccf..e7475b1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,6 @@ language: go sudo: false -cache: pip - go: - 1.2.2 - 1.3.3 diff --git a/cli-v1-to-v2 b/cli-v1-to-v2 index 60a19b6..90f127a 100755 --- a/cli-v1-to-v2 +++ b/cli-v1-to-v2 @@ -171,13 +171,14 @@ def _migrate_v1_imports(source): def _migrate_new_exit_error(source): return _EXIT_ERROR_RE.sub('cli.Exit', source) + @_migrator def _migrate_bool_t_flag(source): return _BOOL_T_FLAG_RE.sub(_bool_t_flag_repl, source) def _bool_t_flag_repl(match): - return 'cli.BoolFlag{{Value: true, {}}}'.format( + return 'cli.BoolFlag{{Value: true,{}}}'.format( match.groupdict()['args'] ) @@ -275,7 +276,7 @@ _MIGRATOR_TESTS = ( \t\t\t\t&cli.StringFlag{ \t\t\t\t\tName: "aha", \t\t\t\t}, -\t\t\t\t&cli.BoolFlag{Value: true, +\t\t\t\t&cli.BoolFlag{Value: true, \t\t\t\t\tName: "blurp", \t\t\t\t}, \t\t\t}