summaryrefslogtreecommitdiff
path: root/apt
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-06-30 11:21:36 +0200
committerMichael Vogt <mvo@debian.org>2014-06-30 11:22:28 +0200
commit9db885ce4fb06f8e154b97cd6cf4e0f09a241f54 (patch)
tree800048e31e28f866927f74d7ff9947c6a0af8bb6 /apt
parent1fd7279ca39c22f9a688e404b27bc1f3aef30cc7 (diff)
downloadpython-apt-9db885ce4fb06f8e154b97cd6cf4e0f09a241f54.tar.gz
make pep8 happy (again)
Diffstat (limited to 'apt')
-rw-r--r--apt/cache.py2
-rw-r--r--apt/debfile.py20
-rw-r--r--apt/utils.py10
3 files changed, 16 insertions, 16 deletions
diff --git a/apt/cache.py b/apt/cache.py
index 36a9fa6b..69ee3693 100644
--- a/apt/cache.py
+++ b/apt/cache.py
@@ -530,7 +530,7 @@ class Cache(object):
def connect(self, name, callback):
""" connect to a signal, currently only used for
cache_{post,pre}_{changed,open} """
- if not name in self._callbacks:
+ if name not in self._callbacks:
self._callbacks[name] = []
self._callbacks[name].append(callback)
diff --git a/apt/debfile.py b/apt/debfile.py
index ca38fdc0..2c95bdf1 100644
--- a/apt/debfile.py
+++ b/apt/debfile.py
@@ -119,7 +119,7 @@ class DebPackage(object):
# now do the real multiarch checking
multiarch_pkgname = "%s:%s" % (pkgname, self._multiarch)
# the upper layers will handle this
- if not multiarch_pkgname in self._cache:
+ if multiarch_pkgname not in self._cache:
return multiarch_pkgname
# now check the multiarch state
cand = self._cache[multiarch_pkgname].candidate._cand
@@ -131,7 +131,7 @@ class DebPackage(object):
# for conflicts we need a special case here, any not multiarch enabled
# package has a implicit conflict
if (in_conflict_checking and
- not (cand.multi_arch & cand.MULTI_ARCH_SAME)):
+ not (cand.multi_arch & cand.MULTI_ARCH_SAME)):
return pkgname
return multiarch_pkgname
@@ -152,7 +152,7 @@ class DebPackage(object):
depname = self._maybe_append_multiarch_suffix(depname)
# check for virtual pkgs
- if not depname in self._cache:
+ if depname not in self._cache:
if self._cache.is_virtual_package(depname):
self._dbg(
3, "_is_or_group_satisfied(): %s is virtual dep" %
@@ -190,7 +190,7 @@ class DebPackage(object):
depname = self._maybe_append_multiarch_suffix(depname)
# if we don't have it in the cache, it may be virtual
- if not depname in self._cache:
+ if depname not in self._cache:
if not self._cache.is_virtual_package(depname):
continue
providers = self._cache.get_providing_packages(depname)
@@ -245,7 +245,7 @@ class DebPackage(object):
#print "pkgver: %s " % pkgver
#print "oper: %s " % oper
if (apt_pkg.check_dep(pkgver, oper, ver) and not
- self.replaces_real_pkg(pkgname, oper, ver)):
+ self.replaces_real_pkg(pkgname, oper, ver)):
self._failure_string += _("Conflicts with the installed package "
"'%s'") % pkg.name
self._dbg(3, "conflicts with installed pkg '%s'" % pkg.name)
@@ -266,7 +266,7 @@ class DebPackage(object):
depname, in_conflict_checking=True)
# check conflicts with virtual pkgs
- if not depname in self._cache:
+ if depname not in self._cache:
# FIXME: we have to check for virtual replaces here as
# well (to pass tests/gdebi-test8.deb)
if self._cache.is_virtual_package(depname):
@@ -430,7 +430,7 @@ class DebPackage(object):
self._cache.op_progress.done()
return False
if (c_or.target_pkg.name in provides and
- self.pkgname != pkg.name):
+ self.pkgname != pkg.name):
self._dbg(
2, "would break (conflicts) %s" % provides)
self._failure_string += _(
@@ -483,7 +483,7 @@ class DebPackage(object):
self._check_was_run = True
# check arch
- if not "Architecture" in self._sections:
+ if "Architecture" not in self._sections:
self._dbg(1, "ERROR: no architecture field")
self._failure_string = _("No Architecture field in the package")
return False
@@ -713,11 +713,11 @@ class DscSrcPackage(DebPackage):
try:
for sec in tagfile:
for tag in depends_tags:
- if not tag in sec:
+ if tag not in sec:
continue
self._depends.extend(apt_pkg.parse_src_depends(sec[tag]))
for tag in conflicts_tags:
- if not tag in sec:
+ if tag not in sec:
continue
self._conflicts.extend(apt_pkg.parse_src_depends(sec[tag]))
if 'Source' in sec:
diff --git a/apt/utils.py b/apt/utils.py
index 5a914fc2..948aac92 100644
--- a/apt/utils.py
+++ b/apt/utils.py
@@ -50,7 +50,7 @@ def get_release_date_from_release_file(path):
return None
tag = apt_pkg.TagFile(open(path))
section = next(tag)
- if not "Date" in section:
+ if "Date" not in section:
return None
date = section["Date"]
return apt_pkg.str_to_time(date)
@@ -70,8 +70,8 @@ def get_release_filename_for_pkg(cache, pkgname, label, release):
for ver_file, _index in aver.file_list:
#print verFile
if (ver_file.origin == label and
- ver_file.label == label and
- ver_file.archive == release):
+ ver_file.label == label and
+ ver_file.archive == release):
ver = aver
if not ver:
return None
@@ -79,8 +79,8 @@ def get_release_filename_for_pkg(cache, pkgname, label, release):
for metaindex in cache._list.list:
for m in metaindex.index_files:
if (indexfile and
- indexfile.describe == m.describe and
- indexfile.is_trusted):
+ indexfile.describe == m.describe and
+ indexfile.is_trusted):
dirname = apt_pkg.config.find_dir("Dir::State::lists")
name = (apt_pkg.uri_to_filename(metaindex.uri) +
"dists_%s_Release" % metaindex.dist)