Skip to content

Commit

Permalink
Make '--developer-mode' a global option
Browse files Browse the repository at this point in the history
Specifying this option will now skip linters not only durin 'build' but
also for all other subcommands.

freeipa#19
  • Loading branch information
Martin Babinsky authored and martbab committed Dec 6, 2016
1 parent c289d16 commit 2bf4578
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions ipadocker/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ def make_parser():
help='container image to use',
metavar='IMAGE_NAME'
)
parser.add_argument(
'--developer-mode',
default=DEFAULT_DEVEL_MODE,
action='store_true',
help="developer mode (linter errors during build are ignored)."
)

subcommands = parser.add_subparsers(
dest='action_name',
Expand All @@ -138,12 +144,6 @@ def make_parser():
default=DEFAULT_MAKE_TARGET,
help='make target'
)
build_cmd.add_argument(
'--developer-mode',
default=DEFAULT_DEVEL_MODE,
action='store_true',
help="developer mode (pylint errors during build are ignored)."
)
build_cmd.add_argument(
'-b',
'--builddep-opts',
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def test_final3_function(call_stack, arguments):


CLI_ARGUMENTS = {
'build --developer-mode --make-target=lint': {
'--developer-mode build --make-target=lint': {
'args': {
'developer_mode': True,
'make_target': 'lint'
Expand Down

0 comments on commit 2bf4578

Please sign in to comment.