Skip to main content

flake8 plugin which forbids boolean positional arguments

Project description

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

Project details


Download files

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

Source Distribution

flake8_boolean_trap-1.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

flake8_boolean_trap-1.0.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file flake8_boolean_trap-1.0.1.tar.gz.

File metadata

  • Download URL: flake8_boolean_trap-1.0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.17 Linux/5.15.0-1041-azure

File hashes

Hashes for flake8_boolean_trap-1.0.1.tar.gz
Algorithm Hash digest
SHA256 603becf640de095fa8ef5e7f8d9945c525ea6913a75df27408be380fd7e0cb3f
MD5 13464ad6c0baf7b12ef8e5d549176e36
BLAKE2b-256 df4f8ba91d20f54227fa791c4a8e52b9c9b8330f1093da1666de16d4fc8621c7

See more details on using hashes here.

File details

Details for the file flake8_boolean_trap-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: flake8_boolean_trap-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.8.17 Linux/5.15.0-1041-azure

File hashes

Hashes for flake8_boolean_trap-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c21b1ce2591028750c7a61760df525361b26ef02bf0e8032082dc7fd0d0f377
MD5 b471c8373e6f58376a4abfb9bd119c00
BLAKE2b-256 e54a98ecacb66251c8afc8bb9d364995688215f33b451d58be8817b03e4d23b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page