mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-07 05:26:53 +00:00
application: Rename prelim parsing method to 'parse_preliminary_options'
Positional arguments are not used nor parsed for pre-configuration loading. Thus, renaming the method and updating the docstrings appropriately.
This commit is contained in:
parent
b5157e194d
commit
1abe1d42c2
4 changed files with 11 additions and 22 deletions
|
|
@ -92,7 +92,7 @@ def test_returns_specified_plugin(application):
|
|||
|
||||
def test_prelim_opts_args(application):
|
||||
"""Verify we get sensible prelim opts and args."""
|
||||
opts, args = application.parse_preliminary_options_and_args(
|
||||
opts, args = application.parse_preliminary_options(
|
||||
['--foo', '--verbose', 'src', 'setup.py', '--statistics', '--version'])
|
||||
|
||||
assert opts.verbose
|
||||
|
|
@ -104,10 +104,7 @@ def test_prelim_opts_ignore_help(application):
|
|||
# GIVEN
|
||||
|
||||
# WHEN
|
||||
_, args = application.parse_preliminary_options_and_args([
|
||||
'--help',
|
||||
'-h',
|
||||
])
|
||||
_, args = application.parse_preliminary_options(['--help', '-h'])
|
||||
|
||||
# THEN
|
||||
assert args == ['--help', '-h']
|
||||
|
|
@ -117,6 +114,6 @@ def test_prelim_opts_handles_empty(application):
|
|||
"""Verify empty argv lists are handled correctly."""
|
||||
irrelevant_args = ['myexe', '/path/to/foo']
|
||||
with mock.patch.object(sys, 'argv', irrelevant_args):
|
||||
opts, args = application.parse_preliminary_options_and_args([])
|
||||
opts, args = application.parse_preliminary_options([])
|
||||
|
||||
assert args == []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue