mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-14 00:14:46 +00:00
Type annotate flake8.options.manager
This commit is contained in:
parent
8cd1e0ecc7
commit
8c4e42afaa
8 changed files with 142 additions and 115 deletions
|
|
@ -52,7 +52,7 @@ def test_add_option_long_option_only(optmanager):
|
|||
assert optmanager.config_options_dict == {}
|
||||
|
||||
optmanager.add_option('--long', help='Test long opt')
|
||||
assert optmanager.options[0].short_option_name is manager._NOARG
|
||||
assert optmanager.options[0].short_option_name is manager._ARG.NO
|
||||
assert optmanager.options[0].long_option_name == '--long'
|
||||
|
||||
|
||||
|
|
@ -133,15 +133,6 @@ def test_parse_args_normalize_paths(optmanager):
|
|||
]
|
||||
|
||||
|
||||
def test_format_plugin():
|
||||
"""Verify that format_plugin turns a tuple into a dictionary."""
|
||||
plugin = manager.OptionManager.format_plugin(
|
||||
manager.PluginVersion('Testing', '0.0.0', False)
|
||||
)
|
||||
assert plugin['name'] == 'Testing'
|
||||
assert plugin['version'] == '0.0.0'
|
||||
|
||||
|
||||
def test_generate_versions(optmanager):
|
||||
"""Verify a comma-separated string is generated of registered plugins."""
|
||||
optmanager.registered_plugins = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue