swh.lister.core: Remove abstractmethod
Some of the new listers like GNU and CRAN do not follow the conventional way of making an HTTP request, hence they do not need some of the methods which are usually needed by in conventional HTTP request. But those method are marked abstractmethod in the core making them necessary to be present. So it is in best to remove abstractmethod to increase the readability of those listers.
This commit is contained in:
parent
b81621274b
commit
f8a2ae866b
2 changed files with 0 additions and 6 deletions
|
@ -70,7 +70,6 @@ class SWHListerBase(abc.ABC, config.SWHConfig):
|
|||
' customized for a specific service.')
|
||||
LISTER_NAME = AbstractAttribute("Lister's name")
|
||||
|
||||
@abc.abstractmethod
|
||||
def transport_request(self, identifier):
|
||||
"""Given a target endpoint identifier to query, try once to request it.
|
||||
|
||||
|
@ -91,7 +90,6 @@ class SWHListerBase(abc.ABC, config.SWHConfig):
|
|||
"""
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def transport_response_to_string(self, response):
|
||||
"""Convert the server response into a formatted string for logging.
|
||||
|
||||
|
@ -105,7 +103,6 @@ class SWHListerBase(abc.ABC, config.SWHConfig):
|
|||
"""
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def transport_response_simplified(self, response):
|
||||
"""Convert the server response into list of a dict for each repo in the
|
||||
response, mapping columns in the lister's MODEL class to repo data.
|
||||
|
@ -122,7 +119,6 @@ class SWHListerBase(abc.ABC, config.SWHConfig):
|
|||
"""
|
||||
pass
|
||||
|
||||
@abc.abstractmethod
|
||||
def transport_quota_check(self, response):
|
||||
"""Check server response to see if we're hitting request rate limits.
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
# License: GNU General Public License version 3, or any later version
|
||||
# See top-level LICENSE file for more information
|
||||
|
||||
import abc
|
||||
import logging
|
||||
|
||||
from swh.core import utils
|
||||
|
@ -20,7 +19,6 @@ class SimpleLister(SWHListerBase):
|
|||
information and stores those in db
|
||||
|
||||
"""
|
||||
@abc.abstractmethod
|
||||
def list_packages(self, *args):
|
||||
"""Listing packages method.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue