Fixed some pylint violations. This also takes care of some bugs.

This commit is contained in:
Adam Waldenberg 2015-10-31 00:03:51 +01:00
parent dd2feedbe4
commit 9287b187f7
4 changed files with 2 additions and 5 deletions

View file

@ -23,7 +23,6 @@ import datetime
import multiprocessing
import re
import subprocess
import sys
import threading
from .localization import N_
from .changes import FileDiff

View file

@ -28,8 +28,6 @@ __cloned_paths__ = []
def create(url):
if url.startswith("file://") or url.startswith("git://") or url.startswith("http://") or \
url.startswith("https://") or url.startswith("ssh://"):
global __cloned_paths__
location = tempfile.mkdtemp(suffix=".gitinspector")
git_clone = subprocess.Popen(["git", "clone", url, location], bufsize=1, stdout=sys.stderr)
git_clone.wait()

View file

@ -21,6 +21,7 @@ from __future__ import print_function
from __future__ import unicode_literals
from ..localization import N_
from .. import metrics
from .changes import FileDiff
from .outputable import Outputable
ELOC_INFO_TEXT = N_("The following files are suspiciously big (in order of severity)")
@ -68,7 +69,7 @@ class MetricsOutput(Outputable):
if metrics_logic.eloc:
metrics_xml += "<div><h4>" + _(ELOC_INFO_TEXT) + ".</h4>"
for num, i in enumerate(sorted(set([(j, i) for (i, j) in metrics_logic.eloc.items()]), reverse=True)):
metrics_xml += "<div class=\"" + __get_metrics_score__(__metric_eloc__[FileDiff.get_extension(i[1])], i[0]) + \
metrics_xml += "<div class=\"" + __get_metrics_score__(metrics.__metric_eloc__[FileDiff.get_extension(i[1])], i[0]) + \
(" odd\">" if num % 2 == 1 else "\">") + \
_("{0} ({1} estimated lines of code)").format(i[1], str(i[0])) + "</div>"
metrics_xml += "</div>"

View file

@ -32,7 +32,6 @@ class Outputable(object):
raise NotImplementedError(_("Text output not yet supported in") + " \"" + self.__class__.__name__ + "\".")
def output_xml(self):
NotImplementedError
raise NotImplementedError(_("XML output not yet supported in") + " \"" + self.__class__.__name__ + "\".")
def output(outputable):