Add new base classes and mixins for defining tools.

Review Request #11525 — Created March 15, 2021 and submitted — Latest diff uploaded

Information

ReviewBot
release-3.0.x

Reviewers

Historically, tools have been a subclass of reviewbot.tools.Tool. We
later added a second base class, reviewbot.tools.RepositoryTool, for
tools that needed a full repository checkout. The fact that that
capability was a base class, and not a mixin, made it hard to introduce
any new base classes, which an upcoming change will do.

To prepare for that, and to keep things organized, a new
reviewbot.tools.base module has been created, with provides
reviewbot.tools.base.tool.BaseTool and
reviewbot.tools.base.mixins.FullRepositoryToolMixin. These are aliased
into reviewbot.tools.base, for convenience.

No tools have been updated yet for this change. Some further work will
be done on the base classes first. Tool updates will come in a series of
changes after this has been completed.

Unit tests pass.

Ran the worker and verified it was able to scan tools and check
dependencies.

Commits

Files

    Loading...