def codequality(self, paths):
        if self.options.list_checkers:
            self._list_checkers()
            return

        # If an scm handler is specified and no paths are given, we let
        # the scm handler choose paths -- otherwise, we default to
        # the current working directory.
        if not paths and not self.options.scmhandler:
            paths = ['.']

        if self.options.scmhandler \
                and self.options.scmhandler not in scmhandlers.scmhandlers:
            raise CommandError(
                'no registered scm handler for "%s".'
                % self.options.scmhandler)

        paths = self._resolve_paths(*paths)
        scmhandler = scmhandlers.scmhandlers.get(
            self.options.scmhandler,
            scmhandlers.NoSCMHandler)()
        errors_exist = False

        checker_to_loc_to_filename = {}
        for filename, location in scmhandler.srcs_to_check(
                paths, rev=self.options.rev,
                ignore_untracked=self.options.ignore_untracked):

            if self._should_ignore(filename):
                continue

            checker_classes = self._relevant_checkers(filename)
            for checker_class in checker_classes:
                loc_to_filename = checker_to_loc_to_filename.setdefault(
                    checker_class, {})
                loc_to_filename[location] = filename

        for checker_class, loc_to_filename \
                in checker_to_loc_to_filename.iteritems():
            locations = loc_to_filename.keys()

            # TODO: this should only be printed if the checker is actually
            # on the path and being used.
            if self.options.verbose:
                for location, filename in loc_to_filename.iteritems():
                    print '[%s] "%s"%s' % (
                        checker_class.__name__,
                        filename,
                        '' if location == filename
                        else (' using "%s"' % location))

            # We allow missing checkers by design. Users can use
            # `--list-checkers` to verify that all desired checkers are
            # installed and on their PATH.
            #
            # Popen raises OSError when the executable can't be found on the
            # path. It would be nice if we didn't repeatedly call out to
            # missing checkers, but this try/except is a quick fix to allow
            # a subset of checkers to work without breaking existing contracts.
            try:
                errs = checker_class().check(locations)
            except OSError:
                continue

            for err in errs:
                errors_exist = True
                err['filename'] = loc_to_filename[err['filename']]
                print err % self.out_fmt
        return errors_exist

    # End public API
dataset/ETHPy150Open jenanwise/codequality/codequality/main.py/CodeQuality.codequality/swapped operands of `%`