Skip to content

Commit

Permalink
- Forward down verbosity level
Browse files Browse the repository at this point in the history
  • Loading branch information
mjsir911 committed Jul 9, 2017
1 parent 769ea41 commit c556daa
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pycodestyle.py
Expand Up @@ -1995,8 +1995,9 @@ def __init__(self, *args, **kwargs):
# 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', False)
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:
Expand Down Expand Up @@ -2256,7 +2257,7 @@ def read_config(options, args, arglist, parser):


def process_options(arglist=None, parse_argv=False, config_file=None,
parser=None):
parser=None, verbose=False):
"""Process options passed either via arglist or via command line args.
Passing in the ``config_file`` parameter allows other tools, such as flake8
Expand All @@ -2280,6 +2281,9 @@ def process_options(arglist=None, parse_argv=False, config_file=None,
(options, args) = parser.parse_args(arglist)
options.reporter = None

if verbose: # If specified verbose, continue on verbosity
options.verbose = verbose

if options.ensure_value('testsuite', False):
args.append(options.testsuite)
elif not options.ensure_value('doctest', False):
Expand Down

0 comments on commit c556daa

Please sign in to comment.