fix codestyle issues in excuse.py

ubuntu/rebased
Ivo De Decker 5 years ago
parent 57f9c98241
commit 3f9092f94b

@ -137,9 +137,9 @@ class Excuse(object):
def add_dependency(self, deptype, name, arch): def add_dependency(self, deptype, name, arch):
"""Add a dependency of type deptype """ """Add a dependency of type deptype """
if name not in self.all_deps: if name not in self.all_deps:
self.all_deps[name]={} self.all_deps[name] = {}
if deptype not in self.all_deps[name]: if deptype not in self.all_deps[name]:
self.all_deps[name][deptype]=[] self.all_deps[name][deptype] = []
self.all_deps[name][deptype].append(arch) self.all_deps[name][deptype].append(arch)
def get_deps(self): def get_deps(self):
@ -155,12 +155,13 @@ class Excuse(object):
def add_sane_dep(self, name): def add_sane_dep(self, name):
"""Add a sane dependency""" """Add a sane dependency"""
if name not in self.sane_deps: self.sane_deps.append(name) if name not in self.sane_deps:
self.sane_deps.append(name)
def add_break_dep(self, name, arch): def add_break_dep(self, name, arch):
"""Add a break dependency""" """Add a break dependency"""
if (name, arch) not in self.break_deps: if (name, arch) not in self.break_deps:
self.break_deps.append( (name, arch) ) self.break_deps.append((name, arch))
def add_unsatisfiable_on_arch(self, arch): def add_unsatisfiable_on_arch(self, arch):
"""Add an arch that has unsatisfiable dependencies""" """Add an arch that has unsatisfiable dependencies"""
@ -267,7 +268,8 @@ class Excuse(object):
def _text(self): def _text(self):
"""Render the excuse in text""" """Render the excuse in text"""
res = [] res = []
res.append("Migration status for %s (%s to %s): %s" % res.append(
"Migration status for %s (%s to %s): %s" %
(self.name, self.ver[0], self.ver[1], self._format_verdict_summary())) (self.name, self.ver[0], self.ver[1], self._format_verdict_summary()))
if not self.is_valid: if not self.is_valid:
res.append("Issues preventing migration:") res.append("Issues preventing migration:")

@ -11,7 +11,7 @@ def should_skip_codestyle():
EXCEPTIONS_BY_FILE = { EXCEPTIONS_BY_FILE = {
'britney.py': 0, 'britney.py': 0,
'britney2/excuse.py': 5, 'britney2/excuse.py': 0,
'britney2/excusefinder.py': 1, 'britney2/excusefinder.py': 1,
'britney2/hints.py': 8, 'britney2/hints.py': 8,
'britney2/installability/tester.py': 4, 'britney2/installability/tester.py': 4,

Loading…
Cancel
Save