Skip to main content

Flake8 Boolean Trap

A flake8 plugin to detect boolean traps.

docs available at readthedocs

“The Boolean Trap” is a programming anti-pattern where a boolean argument switches behaviour, leading to confusion.

To learn more about the impact it can have on your code and how to prevent it, you can refer to the following resources:

Setup

prerequisites

  • python>=3.8

install

$ pip install flake8_boolean_trap

Usage

Just run flake8 as you normally would.

Lint Codes

Code. Description
FBT001 Boolean positional arg in function definition
FBT002 Boolean default value in function definition
FBT003 Boolean positional value in function call

Metadata

Release files for flake8-boolean-trap 1.0.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-boolean-trap 1.0.1
File Size Uploaded Provenance Actions
flake8_boolean_trap-1.0.1.tar.gz 4.5 kB Without provenance Details for flake8_boolean_trap-1.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flake8-boolean-trap 1.0.1
File Interpreter ABI Platform Actions
flake8_boolean_trap-1.0.1-py3-none-any.whl Python 3 none any Details for flake8_boolean_trap-1.0.1-py3-none-any.whl

Total release size: 9.0 kB

Release files / flake8_boolean_trap-1.0.1.tar.gz

Download URL flake8_boolean_trap-1.0.1.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
603becf640de095fa8ef5e7f8d9945c525ea6913a75df27408be380fd7e0cb3f
BLAKE2b-256 checksum
How to use checksums
df4f8ba91d20f54227fa791c4a8e52b9c9b8330f1093da1666de16d4fc8621c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.8.17 Linux/5.15.0-1041-azure

Release files / flake8_boolean_trap-1.0.1-py3-none-any.whl

Download URL flake8_boolean_trap-1.0.1-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c21b1ce2591028750c7a61760df525361b26ef02bf0e8032082dc7fd0d0f377
BLAKE2b-256 checksum
How to use checksums
e54a98ecacb66251c8afc8bb9d364995688215f33b451d58be8817b03e4d23b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.8.17 Linux/5.15.0-1041-azure

Security for flake8-boolean-trap 1.0.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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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