• 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 4.x
    2. Version 4.x
    3. Version 3.0
    4. Version 2.0
    5. Version 1.0
    6. Module and Class Reference
    7. reviewbot.tools.pyflakes
  • 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
  • reviewbot.tools.pyflakes¶

    Review Bot tool to run pyflakes.

    Classes

    PyflakesTool([settings])

    Review Bot tool to run pyflakes.

    class PyflakesTool(settings=None, **kwargs)[source]¶

    Bases: BaseTool

    Review Bot tool to run pyflakes.

    name = 'Pyflakes'[source]¶

    The displayed name of the tool.

    Type:

    str

    version = '1.0'[source]¶

    The compatibility version of the tool.

    This should only be changed for major breaking updates. It will break compatibility with existing integration configurations, requiring manual updates to those configurations. Any existing configurations referencing the old version will not be run, unless an older version of the tool is being handled through another Review Bot worker providing the older tool.

    Type:

    str

    description = 'Checks Python code for errors using Pyflakes.'[source]¶

    A short description of the tool.

    Type:

    str

    timeout = 30[source]¶

    Timeout for tool execution, in seconds.

    Type:

    int

    exe_dependencies = ['pyflakes'][source]¶

    A list of executable tools required by the tool.

    Each is the name of an executable on the filesystem, either in the PATH or defined in the exe_paths configuration.

    These will be checked when the worker starts. If a dependency for a tool is missing, the worker will not enable it.

    New in version 3.0: Tools that previously implemented check_dependencies() may want to be updated to use this.

    Type:

    dict

    file_patterns = ['*.py'][source]¶

    A list of filename patterns this tool can process.

    This is intended for tools that have a fixed list of file extensions or specific filenames they should process. Each entry is a glob file pattern (e.g., *.py, .config/*.xml, dockerfile, etc.), and must be lowercase (as filenames will be normalized to lowercase for comparison). See fnmatch for pattern rules.

    Tools can leave this empty to process all files, or can override get_can_handle_file() to implement custom logic (e.g., basing matching off a tool’s settings, or providing case-sensitive matches).

    New in version 3.0.

    Type:

    list of str

    LINE_RE = re.compile('^(?P<filename>[^:]+)(:(?P<linenum>\\d+)(:(?P<column>\\d+))?)?:? (?P<msg>.*)')[source]¶
    build_base_command(**kwargs)[source]¶

    Build the base command line used to review files.

    Parameters:

    **kwargs (dict, unused) – Additional keyword arguments.

    Returns:

    The base command line.

    Return type:

    list of str

    handle_file(f, path, base_command, **kwargs)[source]¶

    Perform a review of a single file.

    Parameters:
    • f (reviewbot.processing.review.File) – The file to process.

    • path (str) – The local path to the patched file to review.

    • base_command (list of str) – The base command used to run pyflakes.

    • **kwargs (dict, unused) – Additional keyword arguments.

    __annotations__ = {}¶

    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]
    • PyflakesTool
      • PyflakesTool.name
      • PyflakesTool.version
      • PyflakesTool.description
      • PyflakesTool.timeout
      • PyflakesTool.exe_dependencies
      • PyflakesTool.file_patterns
      • PyflakesTool.LINE_RE
      • PyflakesTool.build_base_command()
      • PyflakesTool.handle_file()
      • PyflakesTool.__annotations__