mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-16 09:09:52 +00:00
parent
351e9ff7b2
commit
16f338efd6
1 changed files with 7 additions and 3 deletions
|
|
@ -1822,9 +1822,11 @@ def process_options(arglist=None, parse_argv=False, config_file=None):
|
||||||
parser = OptionParser(version=version,
|
parser = OptionParser(version=version,
|
||||||
usage="%prog [options] input ...")
|
usage="%prog [options] input ...")
|
||||||
parser.config_options = [
|
parser.config_options = [
|
||||||
'exclude', 'filename', 'select', 'ignore', 'max-line-length', 'count',
|
'builtins', 'count', 'exclude', 'filename', 'format', 'ignore',
|
||||||
'format', 'quiet', 'show-pep8', 'show-source', 'statistics', 'verbose']
|
'max-line-length', 'quiet', 'select', 'show-pep8', 'show-source',
|
||||||
parser.add_option('--builtins', default=[], action="append",
|
'statistics', 'verbose',
|
||||||
|
]
|
||||||
|
parser.add_option('--builtins', default='',
|
||||||
help="append builtin function (pyflakes "
|
help="append builtin function (pyflakes "
|
||||||
"_MAGIC_GLOBALS)")
|
"_MAGIC_GLOBALS)")
|
||||||
parser.add_option('-v', '--verbose', default=0, action='count',
|
parser.add_option('-v', '--verbose', default=0, action='count',
|
||||||
|
|
@ -1899,6 +1901,8 @@ def process_options(arglist=None, parse_argv=False, config_file=None):
|
||||||
options = read_config(options, args, arglist, parser)
|
options = read_config(options, args, arglist, parser)
|
||||||
options.reporter = parse_argv and options.quiet == 1 and FileReport
|
options.reporter = parse_argv and options.quiet == 1 and FileReport
|
||||||
|
|
||||||
|
if options.builtins:
|
||||||
|
options.builtins = options.builtins.split(',')
|
||||||
if options.filename:
|
if options.filename:
|
||||||
options.filename = options.filename.split(',')
|
options.filename = options.filename.split(',')
|
||||||
options.exclude = options.exclude.split(',')
|
options.exclude = options.exclude.split(',')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue