Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pre-commit hook to avoid print statements. #709

Closed
Dhruvanshu-Joshi opened this issue Apr 12, 2024 · 2 comments · Fixed by #1193
Closed

Add pre-commit hook to avoid print statements. #709

Dhruvanshu-Joshi opened this issue Apr 12, 2024 · 2 comments · Fixed by #1193

Comments

@Dhruvanshu-Joshi
Copy link
Member

Description

As discussed in #693, we'd like to avoid unnecessary print statements before committing the changes itself. This way, we can avoid unnecessary debug statements.
PyMC already has this implemented within the pymc/.pre-commit-config.yaml module.
We'd like to keep the print statements that already exists untampered and must be excluded.

@ricardoV94
Copy link
Member

The alternative for the print statements that should exist is to pass the kwarg file=sys.stdout to print. But there might be many that should not exist!

pymc-devs/pymc@cdc6a39

@jessegrabowski
Copy link
Member

jessegrabowski commented Apr 28, 2024

Should probably use the logger for anything that is actually supposed to be printed to the console?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants