Skip to content
Snippets Groups Projects
Commit f8a2ae86 authored by Archit Agrawal's avatar Archit Agrawal
Browse files

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.
parent b8162127
No related branches found
Tags v0.0.23
1 merge request!370swh.lister.core: Remove abstractmethod
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment