add pylint errors

This commit is contained in:
Dimitris Zlatanidis 2015-05-28 03:26:57 +03:00
parent 492d487722
commit 48a1ac9a03
3 changed files with 14 additions and 14 deletions

View file

@ -69,8 +69,8 @@ class ArgParse(object):
self.packages = self.args[2:]
if (len(self.args) > 1 and
self.args[0] in ['-f', '-i', '-u', '-o', '-r', '-d', '-n']
and self.args[1].endswith('.pkg')):
self.args[0] in ['-f', '-i', '-u', '-o', '-r', '-d', '-n'] and
self.args[1].endswith('.pkg')):
self.packages = Utils().read_file_pkg(self.args[1])
elif (len(self.args) >= 3 and self.args[0] in ['-s', '-t', '-p', '-F']
and self.args[1] in _m.repositories

View file

@ -275,14 +275,14 @@ class PackageManager(object):
row = int(tty_size[0]) - 2
try:
index, page, pkg_list = 0, row, []
r = self._list_lib(repo)
pkg_list = self._list_greps(repo, r)[0]
r = self.list_lib(repo)
pkg_list = self.list_greps(repo, r)[0]
print('')
for pkg in sorted(pkg_list):
pkg = self._slackr_repo(repo, pkg)
if INDEX:
index += 1
pkg = self._list_color_tag(pkg)
pkg = self.list_color_tag(pkg)
print("{0}{1}:{2} {3}".format(_m.color['GREY'], index,
_m.color['ENDC'], pkg))
if index == page:
@ -295,7 +295,7 @@ class PackageManager(object):
print("") # new line after page
page += row
elif installed:
if self._list_of_installed(pkg):
if self.list_of_installed(pkg):
print('{0}{1}{2}'.format(_m.color['GREEN'], pkg,
_m.color['ENDC']))
else:
@ -305,7 +305,7 @@ class PackageManager(object):
print("") # new line at exit
sys.exit(0)
def _list_greps(self, repo, packages):
def list_greps(self, repo, packages):
'''
Grep packages
'''
@ -322,7 +322,7 @@ class PackageManager(object):
pkg_size.append(line[26:].strip())
return pkg_list, pkg_size
def _list_lib(self, repo):
def list_lib(self, repo):
'''
Return package lists
'''
@ -346,7 +346,7 @@ class PackageManager(object):
return fix_slackers_pkg(pkg)
return pkg
def _list_color_tag(self, pkg):
def list_color_tag(self, pkg):
'''
Tag with color installed packages
'''
@ -358,7 +358,7 @@ class PackageManager(object):
_m.color['ENDC'])
return pkg
def _list_of_installed(self, pkg):
def list_of_installed(self, pkg):
'''
Return installed packages
'''

View file

@ -39,8 +39,8 @@ def find_from_repos(pkg):
print("| {0} {1}{2}{3}".format("Repository", "Package", " " * 54, "Size"))
Msg().template(78)
for repo in _m.repositories:
PACKAGES_TXT = PackageManager(pkg)._list_lib(repo)
packages, sizes = PackageManager(pkg)._list_greps(repo, PACKAGES_TXT)
PACKAGES_TXT = PackageManager(pkg).list_lib(repo)
packages, sizes = PackageManager(pkg).list_greps(repo, PACKAGES_TXT)
for find, size in zip(packages, sizes):
for p in pkg:
if p in find: