Avoid eating *all* arbitrary arguments and passing them along to the
new_lister method.
Details
Details
- Reviewers
olasd - Group Reviewers
Reviewers - Commits
- rDLSd88f1b60c908: core/lister: Make the tasks take an explicit lister_args argument
Diff Detail
Diff Detail
- Repository
- rDLS Listers
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 1348 Build 1692: arc lint + arc unit
Event Timeline
swh/lister/gitlab/tasks.py | ||
---|---|---|
37 | carnage! |
swh/lister/gitlab/tasks.py | ||
---|---|---|
37 | spurious print statement removed! |
Comment Actions
Please don't use mutable values (e.g. {}) as default argument, as they can get mutated and that gives surprising results.
Could you make lister_args a keyword-only argument (i.e. def run_task(self, *, lister_args=None):, and then be explicit about the argument name in the call sites? That way there's no chance the lister_args argument could be mistaken for something else.
Comment Actions
(FTAOD, it's not a problem in this specific instance, but it's a pattern we should generally avoid)