mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 12:16:53 +00:00
Add extend_default_ignore list to OptionManager
This commit is contained in:
parent
5037fab132
commit
551bce11a3
1 changed files with 10 additions and 0 deletions
|
|
@ -156,6 +156,7 @@ class OptionManager(object):
|
|||
self.program_name = prog
|
||||
self.version = version
|
||||
self.registered_plugins = set()
|
||||
self.extended_default_ignore = set()
|
||||
|
||||
@staticmethod
|
||||
def format_plugin(plugin_tuple):
|
||||
|
|
@ -182,6 +183,15 @@ class OptionManager(object):
|
|||
self.config_options_dict[option.config_name] = option
|
||||
LOG.debug('Registered option "%s".', option)
|
||||
|
||||
def extend_default_ignore(self, error_codes):
|
||||
"""Extend the default ignore list with the error codes provided.
|
||||
|
||||
:param list error_codes:
|
||||
List of strings that are the error/warning codes with which to
|
||||
extend the default ignore list.
|
||||
"""
|
||||
self.extended_default_ignore.update(error_codes)
|
||||
|
||||
def generate_versions(self, format_str='%(name)s: %(version)s'):
|
||||
"""Generate a comma-separated list of versions of plugins."""
|
||||
return ', '.join(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue