swh.lister.gitlab: Respect camel case convention

Related T989
This commit is contained in:
Antoine R. Dumont (@ardumont) 2018-07-03 14:14:55 +02:00
parent f8055a34af
commit 9c5963f015
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8
3 changed files with 10 additions and 10 deletions

View file

@ -6,10 +6,10 @@ import re
import time
from ..core.indexing_lister import SWHIndexingHttpLister
from .models import GitlabModel
from .models import GitLabModel
class GitlabLister(SWHIndexingHttpLister):
class GitLabLister(SWHIndexingHttpLister):
# Path to give and mentioning the last id for the next page
PATH_TEMPLATE = '/projects?page=%d'
# gitlab api do not have an indexable identifier so using the page
@ -19,7 +19,7 @@ class GitlabLister(SWHIndexingHttpLister):
# query is not part of the lookup query. So, we cannot filter
# (method filter_before_inject), nor detect and disable origins
# (method disable_deleted_repo_tasks)
MODEL = GitlabModel
MODEL = GitLabModel
def filter_before_inject(self, models_list):
"""We cannot filter so returns the models_list as is.

View file

@ -7,7 +7,7 @@ from sqlalchemy import Column, Boolean, Integer
from ..core.models import ModelBase
class GitlabModel(ModelBase):
class GitLabModel(ModelBase):
"""a Gitlab repository"""
__tablename__ = 'main_gitlab_repos'

View file

@ -6,23 +6,23 @@ from swh.lister.core.tasks import (IndexingDiscoveryListerTask,
IndexingRangeListerTask,
IndexingRefreshListerTask, ListerTaskBase)
from .lister import GitlabLister
from .lister import GitLabLister
class GitlabDotComListerTask(ListerTaskBase):
class GitLabDotComListerTask(ListerTaskBase):
def new_lister(self):
return GitlabLister(lister_name='gitlab.com',
return GitLabLister(lister_name='gitlab.com',
api_baseurl='https://gitlab.com/api/v4')
class IncrementalGitlabDotComLister(GitlabDotComListerTask,
class IncrementalGitLabDotComLister(GitLabDotComListerTask,
IndexingDiscoveryListerTask):
task_queue = 'swh_lister_gitlab_discover'
class RangeGitlabLister(GitlabDotComListerTask, IndexingRangeListerTask):
class RangeGitLabLister(GitLabDotComListerTask, IndexingRangeListerTask):
task_queue = 'swh_lister_gitlab_refresh'
class FullGitlabRelister(GitlabDotComListerTask, IndexingRefreshListerTask):
class FullGitLabRelister(GitLabDotComListerTask, IndexingRefreshListerTask):
task_queue = 'swh_lister_gitlab_refresh'