Exemplo n.º 1
0
    def __init__(self, output=sys.stdout):
        """
        Initiate the the base reporter.

        @param output: output stream
        """
        BaseReporter.__init__(self, output)
Exemplo n.º 2
0
    def __init__(self, output=sys.stdout):
        """
        Initiate the the base reporter.

        @param output: output stream
        """
        BaseReporter.__init__(self, output)
Exemplo n.º 3
0
    def set_output(self, output=None):
        """set output stream

        messages buffered for old output is processed first"""
        if self.out and self.msgs:
            self._display(Section())
        BaseReporter.set_output(self, output)
Exemplo n.º 4
0
    def set_output(self, output=None):
        """set output stream

        messages buffered for old output is processed first"""
        if self.out and self.msgs:
            self._display(Section())
        BaseReporter.set_output(self, output)
Exemplo n.º 5
0
 def __init__(self, message_store, filters, finder, targets):
     BaseReporter.__init__(self, output=None)
     self._message_store = message_store
     self._filters = compile_masks(filters)
     self._targets = targets
     self._finder = finder
     self._all_files = list(finder.files(filters=filters))
     self._tidypy_issues = []
Exemplo n.º 6
0
def test_deprecation_set_output(recwarn):
    """TODO remove in 3.0."""
    reporter = BaseReporter()
    # noinspection PyDeprecation
    reporter.set_output(sys.stdout)
    warning = recwarn.pop()
    assert "set_output' will be removed in 3.0" in str(warning)
    assert reporter.out == sys.stdout
Exemplo n.º 7
0
    def __init__(self, output=sys.stdout):
        BaseReporter.__init__(self, output)
        self.msgs = []
        # Add placeholders for title and parsed messages
        self.header = None
        self.msgargs = []

        warnings.warn("This reporter will be removed in Pylint 2.0.",
                      DeprecationWarning)
Exemplo n.º 8
0
    def __init__(self, output=sys.stdout):
        BaseReporter.__init__(self, output)

        def _default(module_name):
            return junit_types.ModuleErrors(
                module_name=module_name,
                pylint_error_list=list(),
            )

        self._messages = _KeyDefaultDict(_default)
Exemplo n.º 9
0
    def test_add_message_is_deprecated(self):
        if __pkginfo__.numversion > (1, 6, 0):
            with self.assertRaises(AttributeError):
                BaseReporter().add_message

        with warnings.catch_warnings(record=True) as cm:
            warnings.simplefilter("always")
            BaseReporter().add_message(None, None, None)

        self.assertEqual(len(cm), 1)
        self.assertIsInstance(cm[0].message, DeprecationWarning)
        msg = ('This method is deprecated, use handle_message '
               'instead. It will be removed in Pylint 1.6.')
        self.assertEqual(str(cm[0].message), msg)
Exemplo n.º 10
0
 def __init__(self, gui, output=sys.stdout):
     """init"""
     BaseReporter.__init__(self, output)
     self.gui = gui
Exemplo n.º 11
0
Arquivo: xtdlint.py Projeto: Anvil/xtd
 def __init__(self, linter, output=None):
   BaseReporter.__init__(self, output)
   self.m_linter = linter
   self.m_data   = {}
Exemplo n.º 12
0
 def __init__(self, output=None):
     BaseReporter.__init__(self, output)
     self.current_module = None
     self.data = []
Exemplo n.º 13
0
 def __init__(self, output=None):
     BaseReporter.__init__(self, output)
     self._modules = set()
     self._template = None
Exemplo n.º 14
0
 def __init__(self, message_store):
     BaseReporter.__init__(self, output=None)
     self._message_store = message_store
     self._messages = []
Exemplo n.º 15
0
 def __init__(self, output=sys.stdout):
     BaseReporter.__init__(self, output)
     self.msgs = []
     # Add placeholders for title and parsed messages
     self.header = None
     self.msgargs = []
Exemplo n.º 16
0
 def __init__(self, output=sys.stdout):
     BaseReporter.__init__(self, output)
     self.items = {}
     self.current_module = None
     self.current_filepath = None
Exemplo n.º 17
0
 def __init__(self, message_store):
     BaseReporter.__init__(self, output=None)
     self._message_store = message_store
     self._messages = []
Exemplo n.º 18
0
 def __init__(self, output=None):
     BaseReporter.__init__(self, output)
     self.current_module = None
     self.data = []
Exemplo n.º 19
0
 def __init__(self, output=None):
     BaseReporter.__init__(self, output)
     self.data = []
Exemplo n.º 20
0
Arquivo: text.py Projeto: DINKIN/XDM
 def __init__(self, output=None):
     BaseReporter.__init__(self, output)
     self._modules = {}
Exemplo n.º 21
0
 def __init__(self, output=sys.stdout):
     BaseReporter.__init__(self, output)
     self.messages = []
Exemplo n.º 22
0
 def __init__(self, output=sys.stdout):
     BaseReporter.__init__(self, output)
     self.messages = []
Exemplo n.º 23
0
 def __init__(self, output=None):
     BaseReporter.__init__(self, output)
     self._modules = set()
     self._template = None
Exemplo n.º 24
0
 def __init__(self, output=None):
     BaseReporter.__init__(self, output)
     self._modules = {}
Exemplo n.º 25
0
 def __init__(self, output=sys.stdout):
     BaseReporter.__init__(self, output)
     self.msgs = []
     # Add placeholders for title and parsed messages
     self.header = None
     self.msgargs = []
Exemplo n.º 26
0
 def __init__(self, output=sys.stdout):
     BaseReporter.__init__(self, output)
     self.root_node = Element('pmd')
     self.file_nodes = {}
Exemplo n.º 27
0
 def __init__(self, output=None):
     BaseReporter.__init__(self, output)
Exemplo n.º 28
0
 def __init__(self, linter, output=None):
     BaseReporter.__init__(self, output)
     self.m_linter = linter
     self.m_data = {}
Exemplo n.º 29
0
 def __init__(self, output=sys.stdout):
     BaseReporter.__init__(self, output)
     self._modules = {}
Exemplo n.º 30
0
 def __init__(self, gui, output=sys.stdout):
     """init"""
     BaseReporter.__init__(self, output)
     self.msgs = []
     self.gui = gui
Exemplo n.º 31
0
 def __init__(self, output=sys.stdout):
     BaseReporter.__init__(self, output)
     self._modules = {}
Exemplo n.º 32
0
 def __init__(self, root, output=sys.stdout):
     BaseReporter.__init__(self, output)
     # messages is in the following format:
     # filepath : { msgid : [ (lineno, msg) ] }
     self.root = root
     self.messages = defaultdict(lambda : defaultdict(list))
Exemplo n.º 33
0
 def __init__(self):
     BaseReporter.__init__(self, output=None)
     self._messages = []