I use PySnooper library for debugging. It looks like this:
import pysnooper
@pysnooper.snoop()
def number_to_bits(number):
...
I don't want to commit such a code. This @pysnooper library is for debugging only. How to prevent it with pre-commit hooks?
https://github.com/adamchainz/flake8-tidy-imports#banned-modules This linter can do it.
[flake8]
banned-modules = pysnooper = remove debugging code!