Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

pytest plugin to check for commented out code

Project description



[Pytest]( plugin for detecting commented out code in python files.


  • 0.0.5 added compatability for Pytest 5.4 and higher
  • 0.0.4 made eradicate 1.0 compatible, added –agressive (thanks to @avallbona)


install via:

pip install pytest-eradicate

if you then type:

pytest --eradicate

every file ending in .py will be discovered and checked for commented out code.

There is also the option:

pytest --eradicate --aggressive

make more aggressive changes. This may result in false positives. Added in order to update to the last version of eradicate like it seems to be the default mode.


Eradicate is a tool to detect commented out code in Python files.

[Eradicate Github](

As the developer states commented out code has no place in your repository.

Besides that, commented out code is often an indicator for debug statements left behind or code moved out of the way during development.

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 pytest-eradicate, version 0.0.5
Filename, size File type Python version Upload date Hashes
Filename, size pytest_eradicate-0.0.5-py3-none-any.whl (3.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pytest-eradicate-0.0.5.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page