• Get Review Board
  • What's New
  • Products
  • Review Board Code review, image review, and document review
  • Documentation
  • Release Notes
  • Power Pack Enterprise integrations, reports, and enhanced document review
  • Try for 60 Days
  • Purchase
  • RBCommons Review Board as a Service, hosted by us
  • Pricing
  • RBTools Command line tools and Python API for Review Board
  • Documentation
  • Release Notes
  • Review Bot Automated code review, connecting tools you already use
  • Documentation
  • Release Notes
  • RB Gateway Manage Git and Mercurial repositories in your network
  • Documentation
  • Release Notes
  • Learn and Explore
  • What is Code Review?
  • Documentation
  • Frequently Asked Questions
  • Support Options
  • Third-Party Integrations
  • Demo
  • Review Board RBTools Power Pack Review Bot Djblets RB Gateway
    1. Review Bot 3.0
    2. Version 4.x
    3. Version 3.0
    4. Version 2.0
    5. Version 1.0
    6. Module and Class Reference
    7. reviewbot.tools.base.registry
  • Home
  • Installation
  • Manually Installing Review Bot
  • Review Bot Docker Images
  • Upgrading Review Bot
  • Configuring Review Bot
  • Review Bot Tools
  • Cargo Tool
  • Checkstyle
  • Clang Static Analyzer
  • Cppcheck
  • Cpplint
  • Doc8
  • FBInfer
  • Flake8
  • Go Fmt
  • Go Tool
  • JSHint
  • PMD
  • Pycodestyle
  • Pydocstyle
  • Pyflakes
  • RuboCop
  • Rust Fmt
  • Secret Scanner
  • ShellCheck
  • Module and Class Reference
  • reviewbot.tools.base
  • reviewbot.tools.base.mixins
  • reviewbot.tools.base.registry
  • reviewbot.tools.base.tool
  • reviewbot.testing.testcases
  • reviewbot.testing.utils
  • reviewbot.tools.testing
  • reviewbot.tools.testing.decorators
  • reviewbot.tools.testing.testcases
  • reviewbot.processing.review
  • reviewbot.utils.api
  • reviewbot.utils.filesystem
  • reviewbot.utils.log
  • reviewbot.utils.process
  • reviewbot.utils.text
  • reviewbot.celery
  • reviewbot.config
  • reviewbot.deprecation
  • reviewbot.errors
  • reviewbot.repositories
  • reviewbot.tasks
  • reviewbot.tools.cargotool
  • reviewbot.tools.checkstyle
  • reviewbot.tools.clang
  • reviewbot.tools.cppcheck
  • reviewbot.tools.cpplint
  • reviewbot.tools.doc8
  • reviewbot.tools.fbinfer
  • reviewbot.tools.flake8
  • reviewbot.tools.gofmt
  • reviewbot.tools.gotool
  • reviewbot.tools.jshint
  • reviewbot.tools.pmd
  • reviewbot.tools.pycodestyle
  • reviewbot.tools.pydocstyle
  • reviewbot.tools.pyflakes
  • reviewbot.tools.rbsecretscanner
  • reviewbot.tools.rubocop
  • reviewbot.tools.rustfmt
  • reviewbot.tools.shellcheck
  • General Index
  • Python Module Index
  • Release Notes
  • This documentation covers Review Bot 3.0. You can select a version above or view the latest documentation.

    reviewbot.tools.base.registry¶

    Tool registration

    These functions are used to register and look up known tool classes.

    New in version 3.0.

    Functions

    get_tool_class(tool_id)

    Return the tool class with a given ID.

    get_tool_classes()

    Return all registered tool classes.

    load_tool_classes()

    Load tool classes provided by Review Bot and other packages.

    register_tool_class(tool_cls)

    Register a tool class for later lookup.

    unregister_tool_class(tool_id)

    Unregister a tool class by its ID.

    register_tool_class(tool_cls)[source]¶

    Register a tool class for later lookup.

    The tool class must have a tool_id attribute (either directly set, for unit tests, or through load_tool_classes()), and cannot conflict with another tool.

    Parameters:

    tool_cls (type) – A tool class to register (subclass of reviewbot.tools.base.tool.BaseTool).

    Raises:

    ValueError – The tool could not be registered, either due to a missing tool_id or due to a conflict with another tool.

    unregister_tool_class(tool_id)[source]¶

    Unregister a tool class by its ID.

    Parameters:

    tool_id (type) – The ID of the tool to unregister.

    Raises:

    KeyError – The tool could not be found.

    get_tool_class(tool_id)[source]¶

    Return the tool class with a given ID.

    Parameters:

    tool_id (unicode) – The ID of the tool to return.

    Returns:

    The tool class, or None if no tool with that ID exists.

    Return type:

    type

    get_tool_classes()[source]¶

    Return all registered tool classes.

    This will be sorted in alphabetical order, based on the ID.

    Returns:

    A list of tool classes (subclasses of reviewbot.tools.base.tool.BaseTool).

    Return type:

    list of type

    load_tool_classes()[source]¶

    Load tool classes provided by Review Bot and other packages.

    This will scan for any Python packages that provide reviewbot.tools entrypoints, loading the tools into the tool registry.

    Any existing tools will be cleared out before this begins, and any errors will be logged.

    Keep up with the latest Review Board releases, security updates, and helpful information.

    About
    News
    Demo
    RBCommons Hosting
    Integrations
    Happy Users
    Support Options
    Documentation
    FAQ
    User Manual
    RBTools
    Administration Guide
    Power Pack
    Release Notes
    Downloads
    Review Board
    RBTools
    Djblets
    Power Pack
    Package Store
    PGP Signatures
    Contributing
    Bug Tracker
    Submit Patches
    Development Setup
    Wiki
    Follow Us
    Mailing Lists
    Reddit
    Twitter
    Mastodon
    Facebook
    YouTube

    Copyright © 2006-2025 Beanbag, Inc. All rights reserved.

    Terms of Service — Privacy Policy — AI Ethics Policy — Branding

    On this page

    • [Top]
    • register_tool_class()
    • unregister_tool_class()
    • get_tool_class()
    • get_tool_classes()
    • load_tool_classes()