Skip to main content

flake8-action-hero

A plugin for flake8 that performs conditional FIXME/TODO checks.

Action Tags

Code comments that begin with # FIXME:/# TODO: are often referred to as "FIXME Comments". This plugin refers to them as action tags.

Action tags are typically a tag followed by a series of commands and variables. The series is defined by the module (action) handling the conditional test defined in sections below.

The parser for action tags attempts to be fairly flexible and allow for the following:

# This will be ignored since there is no action.
# FIXME: This is a bare fixme comment.
# TODO: This is a bare todo comment.

# This will be ignored since there is no action.
# FIXME(SRS): This comment includes my initials and is a popular way to signify that a
# person found an issue (and isn't directly responsible for fixing it).

# This will be tested since there is a valid action.
# FIXME(SRS): DATE: AFTER: 2022-01-01: This comment includes initials as well as a composite
# action and condition and will be tested.

# This will be ignored since no action handler exists (yet) for this.
# CRITICAL: SCHRÖDINGER: CAT: DEAD: Do not commit while cat is dead.

Date Conditional Action Tags

Examples:

# FIXME: DATE: AFTER: 2021-12-05: This will result in code `AH000: Date conditional action tag found (FIXME)

Package Conditional Action Tags

Package conditional action tags attempt to locate and verify that a locally installed package is contained within a standard python packaging specifier. This provides a utility to tag an area of code that may need to be refactored when a package is released (and locally available) that may contain a feature needed to bring in new functionality or prompt the need to refactor or remove a bugfix fixed upstream.

Examples:

# FIXME: PACKAGE: VERSION: aws-lambda-powertools>=0.19.0: New feature should remove following bandaid code.
# TODO: PACKAGE: VERSION: bungee-jump>=1.29: Can now jump with blindfold.  Add in new feature for blindfold jump.
# CRITICAL: PACKAGE: VERSION: orm-uber-tool>=2.12.0,<=2.12.5: Bug introduced in module will cause CPU to smoke. Danger.

Utilizing this tag requires that following dependencies:

  • packaging: Developed by PyPa team and used in order to test a version against a specifier.
  • importlib_metadata: Developed by Python team and used in order to find the most relevant installed package version within your python environment.

Error Codes

In the error code table the {T}/{...} represents a code and type related to the comment tag. While 10 might be a short list it is most likely considered too long in most standards. This project has opted to add in a few extras that don't directly overlap with other fixme related checkers as a way to offer some extended workflow and alerting functionality.

Code {T} Type {...} Description
0 FIXME ...
1 TODO ...
2 XXX ...
3 BUG ...
4 REFACTOR ...
5 REMOVEME ...
6 LEGACY ...
7 CRITICAL ...
8 WARNING ...
Error codes Description Utility
AH00{T} Date after condition met ({...}) Good for tracking feature dates.
AH01{T} Date before condition met ({...}) Perhaps not very useful.
AH40{T} Package version specifier condition met ({...}) Refactoring against upstream changes.

Metadata

Release files for flake8-action-hero 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flake8-action-hero 0.1.1
File Size Uploaded Provenance
flake8-action-hero-0.1.1.tar.gz 9.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flake8-action-hero 0.1.1
File Interpreter ABI Platform
flake8_action_hero-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 18.0 kB

Release files / flake8-action-hero-0.1.1.tar.gz

Download URL flake8-action-hero-0.1.1.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5d6783a51b7274fd6fb625b5be17668229f2ee3180c34206c294ddd1842f3289
BLAKE2b-256 checksum
How to use checksums
101563179d7654d6664415562ba30950d24c338c0b3bb4ffbcc6594f2b7db835
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.8.10 Linux/5.10.43.3-microsoft-standard-WSL2

Release files / flake8_action_hero-0.1.1-py3-none-any.whl

Download URL flake8_action_hero-0.1.1-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e24616f0c18512da7c45a1718cbe1503540f9997e14e290cfdfd66070fa5200
BLAKE2b-256 checksum
How to use checksums
5b27a8fbd8755a78d1b288838644f6897b5890e0f5097296337dade702ae09ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.8.10 Linux/5.10.43.3-microsoft-standard-WSL2

Security for flake8-action-hero 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page