Fixed some pylint violations.

This commit is contained in:
Adam Waldenberg 2015-11-03 00:44:47 +01:00
parent 949a301698
commit 4fd918fca4
4 changed files with 8 additions and 12 deletions

View file

@ -18,7 +18,6 @@
# along with gitinspector. If not, see <http://www.gnu.org/licenses/>. # along with gitinspector. If not, see <http://www.gnu.org/licenses/>.
from __future__ import unicode_literals from __future__ import unicode_literals
from collections import namedtuple
import os import os
import shutil import shutil
import subprocess import subprocess

View file

@ -20,7 +20,6 @@
from __future__ import print_function from __future__ import print_function
from __future__ import unicode_literals from __future__ import unicode_literals
import json import json
import sys
import textwrap import textwrap
from ..localization import N_ from ..localization import N_
from .. import format, gravatar, terminal from .. import format, gravatar, terminal

View file

@ -40,8 +40,8 @@ class ResponsibilitiesOutput(Outputable):
print("\n" + textwrap.fill(_(RESPONSIBILITIES_INFO_TEXT) + ":", width=terminal.get_size()[0])) print("\n" + textwrap.fill(_(RESPONSIBILITIES_INFO_TEXT) + ":", width=terminal.get_size()[0]))
for i in sorted(set(i[0] for i in self.blame.blames)): for i in sorted(set(i[0] for i in self.blame.blames)):
responsibilities = sorted(((i[1], i[0]) for i in resp.Responsibilities.get(self.changes, responsibilities = sorted(((i[1], i[0]) for i in resp.Responsibilities.get(self.blame, i)), reverse=True)
self.blame, i)), reverse=True)
if responsibilities: if responsibilities:
print("\n" + i, _(MOSTLY_RESPONSIBLE_FOR_TEXT) + ":") print("\n" + i, _(MOSTLY_RESPONSIBLE_FOR_TEXT) + ":")
@ -60,8 +60,8 @@ class ResponsibilitiesOutput(Outputable):
resp_xml += "<p>" + _(RESPONSIBILITIES_INFO_TEXT) + ".</p>" resp_xml += "<p>" + _(RESPONSIBILITIES_INFO_TEXT) + ".</p>"
for i in sorted(set(i[0] for i in self.blame.blames)): for i in sorted(set(i[0] for i in self.blame.blames)):
responsibilities = sorted(((i[1], i[0]) for i in resp.Responsibilities.get(self.changes, responsibilities = sorted(((i[1], i[0]) for i in resp.Responsibilities.get(self.blame, i)), reverse=True)
self.blame, i)), reverse=True)
if responsibilities: if responsibilities:
resp_xml += "<div>" resp_xml += "<div>"
@ -87,8 +87,8 @@ class ResponsibilitiesOutput(Outputable):
resp_xml = "" resp_xml = ""
for i in sorted(set(i[0] for i in self.blame.blames)): for i in sorted(set(i[0] for i in self.blame.blames)):
responsibilities = sorted(((i[1], i[0]) for i in resp.Responsibilities.get(self.changes, responsibilities = sorted(((i[1], i[0]) for i in resp.Responsibilities.get(self.blame, i)), reverse=True)
self.blame, i)), reverse=True)
if responsibilities: if responsibilities:
author_email = self.changes.get_latest_email_by_author(i) author_email = self.changes.get_latest_email_by_author(i)
@ -118,8 +118,7 @@ class ResponsibilitiesOutput(Outputable):
resp_xml = "" resp_xml = ""
for i in sorted(set(i[0] for i in self.blame.blames)): for i in sorted(set(i[0] for i in self.blame.blames)):
responsibilities = sorted(((i[1], i[0]) for i in resp.Responsibilities.get(self.changes, responsibilities = sorted(((i[1], i[0]) for i in resp.Responsibilities.get(self.blame, i)), reverse=True)
self.blame, i)), reverse=True)
if responsibilities: if responsibilities:
author_email = self.changes.get_latest_email_by_author(i) author_email = self.changes.get_latest_email_by_author(i)

View file

@ -19,14 +19,13 @@
from __future__ import print_function from __future__ import print_function
from __future__ import unicode_literals from __future__ import unicode_literals
from . import blame
class ResponsibiltyEntry(object): class ResponsibiltyEntry(object):
blames = {} blames = {}
class Responsibilities(object): class Responsibilities(object):
@staticmethod @staticmethod
def get(changes, blame, author_name): def get(blame, author_name):
author_blames = {} author_blames = {}
for i in blame.blames.items(): for i in blame.blames.items():