本文整理汇总了Python中pylint.checkers.BaseTokenChecker.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python BaseTokenChecker.__init__方法的具体用法?Python BaseTokenChecker.__init__怎么用?Python BaseTokenChecker.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pylint.checkers.BaseTokenChecker
的用法示例。
在下文中一共展示了BaseTokenChecker.__init__方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pylint.checkers import BaseTokenChecker [as 别名]
# 或者: from pylint.checkers.BaseTokenChecker import __init__ [as 别名]
def __init__(self, options=(), reporter=None, option_groups=(),
pylintrc=None):
# some stuff has to be done before ancestors initialization...
#
# messages store / checkers / reporter / astroid manager
self.msgs_store = MessagesStore()
self.reporter = None
self._reporter_name = None
self._reporters = {}
self._checkers = {}
self._ignore_file = False
# visit variables
self.file_state = FileState()
self.current_name = None
self.current_file = None
self.stats = None
# init options
self.options = options + PyLinter.make_options()
self.option_groups = option_groups + PyLinter.option_groups
self._options_methods = {
'enable': self.enable,
'disable': self.disable}
self._bw_options_methods = {'disable-msg': self.disable,
'enable-msg': self.enable}
full_version = '%%prog %s, \nastroid %s, common %s\nPython %s' % (
version, astroid_version, common_version, sys.version)
OptionsManagerMixIn.__init__(self, usage=__doc__,
version=full_version,
config_file=pylintrc or config.PYLINTRC)
MessagesHandlerMixIn.__init__(self)
ReportsHandlerMixIn.__init__(self)
BaseTokenChecker.__init__(self)
# provided reports
self.reports = (('RP0001', 'Messages by category',
report_total_messages_stats),
('RP0002', '% errors / warnings by module',
report_messages_by_module_stats),
('RP0003', 'Messages',
report_messages_stats),
('RP0004', 'Global evaluation',
self.report_evaluation),
)
self.register_checker(self)
self._dynamic_plugins = set()
self.load_provider_defaults()
if reporter:
self.set_reporter(reporter)
示例2: __init__
# 需要导入模块: from pylint.checkers import BaseTokenChecker [as 别名]
# 或者: from pylint.checkers.BaseTokenChecker import __init__ [as 别名]
def __init__(self, linter=None):
BaseTokenChecker.__init__(self, linter)
self._lines = None
self._visited_lines = None
self._bracket_stack = [None]
示例3: __init__
# 需要导入模块: from pylint.checkers import BaseTokenChecker [as 别名]
# 或者: from pylint.checkers.BaseTokenChecker import __init__ [as 别名]
def __init__(self, linter):
BaseTokenChecker.__init__(self, linter)
self.stats = None
示例4: __init__
# 需要导入模块: from pylint.checkers import BaseTokenChecker [as 别名]
# 或者: from pylint.checkers.BaseTokenChecker import __init__ [as 别名]
def __init__(self, linter=None):
BaseTokenChecker.__init__(self, linter)
self._init()