Skip to content
Snippets Groups Projects
Unverified Commit c6318094 authored by Ian Stapleton Cordasco's avatar Ian Stapleton Cordasco Committed by GitHub
Browse files

Merge pull request #663 from mjsir911/merge

Allow continuation of verbosity level
parents f810ae19 d436d955
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2046,8 +2046,9 @@ class StyleGuide(object):
# build options from dict
options_dict = dict(*args, **kwargs)
arglist = None if parse_argv else options_dict.get('paths', None)
verbose = options_dict.get('verbose', None)
options, self.paths = process_options(
arglist, parse_argv, config_file, parser)
arglist, parse_argv, config_file, parser, verbose)
if options_dict:
options.__dict__.update(options_dict)
if 'paths' in options_dict:
Loading
Loading
@@ -2307,7 +2308,7 @@ def read_config(options, args, arglist, parser):
 
 
def process_options(arglist=None, parse_argv=False, config_file=None,
parser=None):
parser=None, verbose=None):
"""Process options passed either via arglist or via command line args.
 
Passing in the ``config_file`` parameter allows other tools, such as flake8
Loading
Loading
@@ -2331,6 +2332,10 @@ def process_options(arglist=None, parse_argv=False, config_file=None,
(options, args) = parser.parse_args(arglist)
options.reporter = None
 
# If explicity specified verbosity, override any `-v` CLI flag
if verbose is not None:
options.verbose = verbose
if options.ensure_value('testsuite', False):
args.append(options.testsuite)
elif not options.ensure_value('doctest', False):
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment