Skip to main content

Check TODOs in the project

Project description

Plugin for the flake8 linter to check TODO comments in Python source code.

Good:

# TODO(jamie): check performance
# https://github.com/eclecticiq/flake8-todos/issues/1337

Bad:

# FIXME idk how it works lol

Why?

Checks

  • T001: use TODO instead of FIXME (or BUG) for consistency.
  • T002: add author into TODO (read about motivation here).
  • T003: add link on issue into TODO.
  • T004: missed colon in TODO.
  • T005: missed text in TODO.
  • T006: write TODO instead of ToDo (use upper case).

Installation

python3 -m pip install --user flake8-todos

Usage

To check that the plugin was added to flake8, run this command:

$ python3 -m flake8 --version
3.7.7 (flake8-todos: 1.0.0, mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.6.7 on Linux

If you do not see flake8-todos in the output, check that flake8 and flake8-todos are installed using the same interpreter. In practice this means both need to be installed into the same virtual environment.

If everything is okay, run flake8:

python -m flake8 example.py

Configuration

The flake8 docs explain how to configure flake8. The flake8-todos plugin uses codes starting with the letter T. See the checks above for a full list.

License

The content of this repository is released under the 3-clause BSD license. See the LICENSE file for more information.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flake8-todos, version 0.1.3
Filename, size File type Python version Upload date Hashes
Filename, size flake8_todos-0.1.3-py3-none-any.whl (7.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size flake8-todos-0.1.3.tar.gz (10.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page