{"id":20495434,"url":"https://github.com/vyahello/flake8-debug","last_synced_at":"2025-10-07T08:14:32.911Z","repository":{"id":57429950,"uuid":"466173025","full_name":"vyahello/flake8-debug","owner":"vyahello","description":"🛑  flake8 plugin that forbids debug funcs in prod codebase (flake8, ast)","archived":false,"fork":false,"pushed_at":"2024-04-23T13:38:13.000Z","size":187,"stargazers_count":2,"open_issues_count":8,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-25T13:27:46.759Z","etag":null,"topics":["disable-print","flake8-plugin"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/flake8-debug","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vyahello.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-03-04T15:24:12.000Z","updated_at":"2024-04-23T13:38:16.000Z","dependencies_parsed_at":"2025-04-13T17:43:50.124Z","dependency_job_id":"3cecf659-78b0-4140-8ff6-6ce2ef230f58","html_url":"https://github.com/vyahello/flake8-debug","commit_stats":null,"previous_names":["vyahello/flake8-no-print"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/vyahello/flake8-debug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fflake8-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fflake8-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fflake8-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fflake8-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vyahello","download_url":"https://codeload.github.com/vyahello/flake8-debug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vyahello%2Fflake8-debug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278740853,"owners_count":26037482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["disable-print","flake8-plugin"],"created_at":"2024-11-15T17:45:54.069Z","updated_at":"2025-10-07T08:14:32.877Z","avatar_url":"https://github.com/vyahello.png","language":"Python","readme":"![Screenshot](icon.png)\n\n[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)\n[![Coverage Status](https://coveralls.io/repos/github/vyahello/flake8-debug/badge.svg?branch=master)](https://coveralls.io/github/vyahello/flake8-debug?branch=master)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Checked with flake8](https://img.shields.io/badge/flake8-checked-blue)](http://flake8.pycqa.org/)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE.md)\n[![PyPI version shields.io](https://img.shields.io/pypi/v/flake8-debug.svg)](https://pypi.python.org/pypi/flake8-debug/)\n[![PyPI pyversions](https://img.shields.io/pypi/pyversions/flake8-debug.svg)](https://pypi.python.org/pypi/flake8-debug)\n[![PyPi downloads](https://img.shields.io/pypi/dm/flake8-debug.svg)](https://pypi.python.org/pypi/flake8-debug)\n[![Downloads](https://pepy.tech/badge/flake8-debug)](https://pepy.tech/project/flake8-debug)\n[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n\n# flake8-debug\n\n\u003e A simple flake8 plugin that forbids the usage of `print`, `breakpoint` and `pdb.set_trace` functions in production code.\n\n## Tools\n\n### Production\n- python 3.7+\n- [flake8](http://flake8.pycqa.org/en/latest/)\n\n### Development\n\n- [black](https://black.readthedocs.io/en/stable/)\n- [flake8](http://flake8.pycqa.org/en/latest/)\n- [pytest](https://docs.pytest.org/en/7.0.x/)\n\n## Installation\n\n### PYPI\n\n```bash\npip install flake8-debug\n✨ 🍰 ✨\n```\n\n### Source code\n\n```bash\ngit clone git@github.com:vyahello/flake8-debug.git\ncd flake8-debug\npython3 -m venv venv \n. venv/bin/activate\npip install -e .\n```\n\n## Errors\n\n### Codes\n\n- `DB100` - print function is detected.\n- `DB200` - breakpoint function is detected.\n- `DB201` - breakpointhook function is detected.\n- `DB300` - set_trace function is detected.\n\n### Sample\n\n```python\n# foo.py\nimport pdb\nfrom pdb import set_trace\nfrom sys import breakpointhook\n\n\ndef bar(*a):\n    print(a)\n    breakpoint()\n    breakpointhook()\n    set_trace()\n    pdb.set_trace()\n```\n\n```bash\nflake8 foo.py\n\nfoo.py:7:5: DB100 print() function usage is detected\nfoo.py:8:5: DB200 breakpoint() function usage is detected\nfoo.py:9:5: DB201 breakpointhook() function usage is detected\nfoo.py:10:5: DB300 set_trace() function usage is detected\nfoo.py:11:5: DB300 set_trace() function usage is detected\n```\n\n**[⬆ back to top](#flake8-debug)**\n\n## Development notes\n\n### Testing \n\nPlease run the following script to start plugin tests:\n```bash\npytest \n```\n\n### CI\n\nTo be able to run code analysis, please execute command below:\n```bash\n./analyse-source-code.sh\n```\n\n### Meta\n\nAuthor – _Vladimir Yahello_.\n\nDistributed under the `MIT` license. See [license](LICENSE.md) for more information.\n\nYou can reach out me at:\n* [vyahello@gmail.com](vyahello@gmail.com)\n* [https://twitter.com/vyahello](https://twitter.com/vyahello)\n* [https://www.linkedin.com/in/volodymyr-yahello-821746127](https://www.linkedin.com/in/volodymyr-yahello-821746127)\n\n### Contributing\n\nI would highly appreciate any contribution and support. If you are interested to add your ideas into project please follow next simple steps:\n\n1. Clone the repository\n2. Configure `git` for the first time after cloning with your `name` and `email`\n3. `pip install -r requirements.txt` to install all project dependencies\n4. `pip install -r requirements-dev.txt` to install all development project dependencies\n5. Create your feature branch (git checkout -b feature/fooBar)\n6. Commit your changes (git commit -am 'Add some fooBar')\n7. Push to the branch (git push origin feature/fooBar)\n8. Create a new Pull Request\n\n### What's next\n\nAll recent activities and ideas are described at project [issues](https://github.com/vyahello/flake8-debug/issues) page. \nIf you have ideas you want to change/implement please do not hesitate and create an issue.\n\n**[⬆ back to top](#flake8-debug)**\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvyahello%2Fflake8-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvyahello%2Fflake8-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvyahello%2Fflake8-debug/lists"}