diff options
author | Mykyta Holubakha <hilobakho@gmail.com> | 2019-06-09 02:04:47 +0300 |
---|---|---|
committer | Mykyta Holubakha <hilobakho@gmail.com> | 2019-06-09 02:04:47 +0300 |
commit | 11f9d095b5be2d8d63cdaf5133f21ee6f7443641 (patch) | |
tree | 5de25db13299bae7e552bcc081d32b536b3fde50 /pomu/source | |
parent | cli: argument passing fixes (diff) | |
download | pomu-11f9d095b5be2d8d63cdaf5133f21ee6f7443641.tar.gz pomu-11f9d095b5be2d8d63cdaf5133f21ee6f7443641.tar.bz2 pomu-11f9d095b5be2d8d63cdaf5133f21ee6f7443641.zip |
Fix some pylint errors
Diffstat (limited to 'pomu/source')
-rw-r--r-- | pomu/source/file.py | 2 | ||||
-rw-r--r-- | pomu/source/manager.py | 6 | ||||
-rw-r--r-- | pomu/source/portage.py | 2 | ||||
-rw-r--r-- | pomu/source/url.py | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/pomu/source/file.py b/pomu/source/file.py index 9f74d6c..a3a7e91 100644 --- a/pomu/source/file.py +++ b/pomu/source/file.py @@ -54,7 +54,7 @@ class LocalEbuildSource(BaseSource): @dispatcher.handler(priority=5) def parse_ebuild_path(uri): - if not path.isfile(uri) or not path.endswith('.ebuild'): + if not path.isfile(uri) or not uri.endswith('.ebuild'): return Result.Err() uri = path.abspath(uri) dirn, basen = path.split(uri) diff --git a/pomu/source/manager.py b/pomu/source/manager.py index c4a0077..60dfe38 100644 --- a/pomu/source/manager.py +++ b/pomu/source/manager.py @@ -63,8 +63,8 @@ class PackageDispatcher(): class _handler(): def __init__(self, handler): self.handler = handler - def __call__(self, *args): - return self.handler(*args) + def __call__(self, *args, **kwargs): + return self.handler(*args, **kwargs) def __init__(self, priority=1000, *args, **kwargs): self.priority = priority @@ -72,7 +72,7 @@ class PackageDispatcher(): def __call__(self, func, *args, **kwargs): x = self._handler(func) x.priority = self.priority - return x + return staticmethod(x) def register_package_handler(self, source, handler, priority): """ diff --git a/pomu/source/portage.py b/pomu/source/portage.py index a832ff1..9f5ba5a 100644 --- a/pomu/source/portage.py +++ b/pomu/source/portage.py @@ -145,4 +145,4 @@ def sanity_check(repo, category, name, vernum, suff, rev, slot, ver=None): pkg = sorted(pkgs, key=cmp_to_key(lambda x,y:vercmp(x[3],y[3])), reverse=True)[0] return PortagePackage(*pkg) -__all__ = [PortagePackage, PortageSource] +__all__ = ['PortagePackage', 'PortageSource'] diff --git a/pomu/source/url.py b/pomu/source/url.py index 8f0366c..b0ad2be 100644 --- a/pomu/source/url.py +++ b/pomu/source/url.py @@ -53,7 +53,7 @@ class URLEbuild(PackageBase): def write_meta(self, pkgdir): super().write_meta(pkgdir) with open(path.join(pkgdir, 'ORIG_URL'), 'w') as f: - f.write(self.path + '\n') + f.write(self.url + '\n') def __str__(self): return super().__str__() + ' (from {})'.format(self.url) @@ -86,7 +86,7 @@ class URLGrabberSource(BaseSource): def parse_full(url): if not url.startswith('url:'): return Result.Err() - return URLGrabberSource.parse_ebuild_path(url[4:]) + return URLGrabberSource.parse_link(url[4:]) @classmethod def fetch_package(self, pkg): |