aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykyta Holubakha <hilobakho@gmail.com>2019-06-09 02:15:49 +0300
committerMykyta Holubakha <hilobakho@gmail.com>2019-06-09 02:15:49 +0300
commit3c1e42aa026c809a2c17e8a42abfc6f4df5e4a23 (patch)
tree933e1044e398254f1f31656ad4f5b7fb09d6a2f9
parentFix some errors found by pylint in sources (diff)
downloadpomu-3c1e42aa026c809a2c17e8a42abfc6f4df5e4a23.tar.gz
pomu-3c1e42aa026c809a2c17e8a42abfc6f4df5e4a23.tar.bz2
pomu-3c1e42aa026c809a2c17e8a42abfc6f4df5e4a23.zip
Mark handlers as static with to make pylint happy
TODO: figure out a way to make it happy without doing this explicitely
-rw-r--r--pomu/source/base.py1
-rw-r--r--pomu/source/bugz.py3
-rw-r--r--pomu/source/file.py2
-rw-r--r--pomu/source/portage.py3
-rw-r--r--pomu/source/url.py2
5 files changed, 11 insertions, 0 deletions
diff --git a/pomu/source/base.py b/pomu/source/base.py
index 2cf35e4..e425420 100644
--- a/pomu/source/base.py
+++ b/pomu/source/base.py
@@ -88,6 +88,7 @@ class BaseSource:
__cname__ = None
@dispatcher.handler()
+ @staticmethod
def parse_full(uri):
"""
This method shall parse a full package specification (which starts with
diff --git a/pomu/source/bugz.py b/pomu/source/bugz.py
index c85cee1..f6d4ef7 100644
--- a/pomu/source/bugz.py
+++ b/pomu/source/bugz.py
@@ -53,6 +53,7 @@ class BugzillaSource(BaseSource):
__cname__ = 'bugzilla'
@dispatcher.handler(priority=1)
+ @staticmethod
def parse_bug(uri):
if not uri.isdigit():
return Result.Err()
@@ -83,6 +84,7 @@ class BugzillaSource(BaseSource):
return Result.Ok(BzEbuild(uri, fmap, category, name, ver, slot))
@dispatcher.handler(priority=2)
+ @staticmethod
def parse_link(uri):
res = urlparse(uri)
if res.netloc != 'bugs.gentoo.org':
@@ -96,6 +98,7 @@ class BugzillaSource(BaseSource):
@dispatcher.handler()
+ @staticmethod
def parse_full(uri):
if not uri.startswith('bug:'):
return Result.Err()
diff --git a/pomu/source/file.py b/pomu/source/file.py
index 51f86c6..7658435 100644
--- a/pomu/source/file.py
+++ b/pomu/source/file.py
@@ -53,6 +53,7 @@ class LocalEbuildSource(BaseSource):
__cname__ = 'fs'
@dispatcher.handler(priority=5)
+ @staticmethod
def parse_ebuild_path(uri):
if not path.isfile(uri) or not uri.endswith('.ebuild'):
return Result.Err()
@@ -71,6 +72,7 @@ class LocalEbuildSource(BaseSource):
return Result.Ok(LocalEbuild(uri, category, name, ver, slot))
@dispatcher.handler()
+ @staticmethod
def parse_full(uri):
if not uri.startswith('fs:'):
return Result.Err()
diff --git a/pomu/source/portage.py b/pomu/source/portage.py
index 9f5ba5a..d3050ac 100644
--- a/pomu/source/portage.py
+++ b/pomu/source/portage.py
@@ -56,6 +56,7 @@ class PortageSource(BaseSource):
__cname__ = 'portage'
@dispatcher.handler(priority=5)
+ @staticmethod
def parse_spec(uri, repo=None):
# dev-libs/openssl-0.9.8z_p8-r100:0.9.8::gentoo
pkg, _, repo_ = uri.partition('::') # portage repo may be specified on the rhs as well
@@ -72,6 +73,7 @@ class PortageSource(BaseSource):
return Result.Ok(res)
@dispatcher.handler()
+ @staticmethod
def parse_full(uri):
# portage/gentoo:dev-libs/openssl-0.9.8z_p8-r100:0.9.8::gentoo
if not uri.startswith('portage'):
@@ -89,6 +91,7 @@ class PortageSource(BaseSource):
return PortageSource.parse_spec(uri, repo)
@dispatcher.handler(priority=4)
+ @staticmethod
def parse_repo_ebuild(uri):
if not path.exists(uri):
return Result.Err()
diff --git a/pomu/source/url.py b/pomu/source/url.py
index 6aca558..bb4868c 100644
--- a/pomu/source/url.py
+++ b/pomu/source/url.py
@@ -67,6 +67,7 @@ class URLGrabberSource(BaseSource):
__cname__ = 'url'
@dispatcher.handler(priority=5)
+ @staticmethod
def parse_link(uri):
if not (uri.startswith('http://') or uri.startswith('https://')):
return Result.Err()
@@ -83,6 +84,7 @@ class URLGrabberSource(BaseSource):
return Result.Ok(URLEbuild(uri, files[0][1], category, name, ver, slot))
@dispatcher.handler()
+ @staticmethod
def parse_full(url):
if not url.startswith('url:'):
return Result.Err()