Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-lister
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform
Development
swh-lister
Commits
72e208ae
Verified
Commit
72e208ae
authored
5 years ago
by
Antoine R. Dumont
Browse files
Options
Downloads
Patches
Plain Diff
lister_base: Clarify docstrings
parent
64a9bc69
No related branches found
Branches containing commit
Tags
v0.0.27
Tags containing commit
1 merge request
!66
lister.core: Remove origin creation from lister behavior
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swh/lister/core/lister_base.py
+8
-11
8 additions, 11 deletions
swh/lister/core/lister_base.py
with
8 additions
and
11 deletions
swh/lister/core/lister_base.py
+
8
−
11
View file @
72e208ae
...
...
@@ -135,29 +135,26 @@ class SWHListerBase(abc.ABC, config.SWHConfig):
pass
def
filter_before_inject
(
self
,
models_list
):
"""
Function run after transport_response_simplified but before
injection into the local db and creation of workers. Can be
used to eliminate some of the results if necessary.
"""
Filter models_list entries prior to injection in the db.
This is ran directly after `transport_response_simplified`.
MAY BE OVERRIDDEN if an intermediate Lister class needs to filter
results before injection without requiring every child class to do so.
Default implementation is to have no filtering.
Args:
models_list: list of dicts returned by
transport_response_simplified.
Returns:
models_list with entries changed according to custom logic.
"""
return
models_list
def
do_additional_checks
(
self
,
models_list
):
"""
Execute some additional checks on the model list. For example, to
check for existing repositories in the db.
MAY BE OVERRIDDEN if an intermediate Lister class needs to
check some more the results before injection.
"""
Execute some additional checks on the model list (after the
filtering).
Checks are fine by default, returns the models_list as is by default.
Default implementation is to run no check at all and to return
the input as is.
Args:
models_list: list of dicts returned by
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment