Avoid committing breakpoints

Don't commit breakpoints. This will pause execution in prod and break the app.

If our GitHub code review bot spots this issue in your pull request it gives this advice:

code-review-doctorbotsuggested changes just now
views.py
1
+
class HomeView(View):
2
+
    def get(self, request):
3
+
        import pdb; pdb.set_trace()
Suggested changes
-
        import pdb; pdb.set_trace()
Commit suggestion

Don't commit breakpoints. This will pause execution in prod and break the app.

Read more
4
+
        ...
Update views.py
We're your Python code review copilot. Get code improvements right in your pull request with our GitHub code review bot.

Configuring this check

Code Review Doctor will run this check by default. No configuration is needed but the check can be turned on/off using check code no-breakpoint in your pyproject.toml file.

Read more about configuring Code Review Doctor.

Reading list