Skip to main content

Flake8 plugin to forbid debug function usage

Project description

made-with-python Coverage Status Code style: black Checked with flake8 License PyPI version PyPI pyversions PyPi downloads Downloads EO principles respected here


A simple flake8 plugin that forbids the usage of print, breakpoint and pdb.set_trace functions in production code.






pip install flake8-debug
✨ 🍰 ✨

Source code

git clone
cd flake8-debug
python3 -m venv venv 
. venv/bin/activate
pip install -e .



DB100 - print function is forbidden. DB200 - breakpoint function is forbidden. DB201 - breakpointhook function is forbidden. DB300 - set_trace function is forbidden.


from sys import breakpointhook
from pdb import set_trace

def bar(*a):
flake8 DB100 print() function usage is detected DB200 breakpoint() function usage is detected DB201 breakpointhook() function usage is detected DB300 set_trace() function usage is detected

Development notes


Please run the following script to start plugin tests:



To be able to run code analysis, please execute command below:



Author – Vladimir Yahello.

Distributed under the MIT license. See license for more information.

You can reach out me at:


I would highly appreciate any contribution and support. If you are interested to add your ideas into project please follow next simple steps:

  1. Clone the repository
  2. Configure git for the first time after cloning with your name and email
  3. pip install -r requirements.txt to install all project dependencies
  4. pip install -r requirements-dev.txt to install all development project dependencies
  5. Create your feature branch (git checkout -b feature/fooBar)
  6. Commit your changes (git commit -am 'Add some fooBar')
  7. Push to the branch (git push origin feature/fooBar)
  8. Create a new Pull Request

What's next

All recent activities and ideas are described at project issues page. If you have ideas you want to change/implement please do not hesitate and create an issue.

Project details

Download files

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

Built Distribution

flake8_debug-0.1.1-py3-none-any.whl (5.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page