Skip to content

[flake8-debugger] Also flag sys.breakpointhook and sys.__breakpointhook__ (T100) #16191

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

Merged
merged 2 commits into from
Feb 16, 2025

Conversation

ntBre
Copy link
Contributor

@ntBre ntBre commented Feb 16, 2025

Summary

Fixes #16189.

Only sys.breakpointhook is flagged by the upstream linter:
https://github.com/pylint-dev/pylint/blob/007a745c8619c2cbf59f829a8f09fc6afa6eb0f1/pylint/checkers/stdlib.py#L38

but I think it makes sense to flag __breakpointhook__ too, as suggested in the issue because it

contain[s] the original value of breakpointhook [...] in case [it happens] to get replaced with broken or alternative objects.

Test Plan

New T100 test cases

@ntBre ntBre added the rule Implementing or modifying a lint rule label Feb 16, 2025
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre merged commit 3a0d45c into main Feb 16, 2025
21 checks passed
@ntBre ntBre deleted the brent/t100-breakpointhook branch February 16, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

T100 doesn’t flag sys.breakpointhook and sys.__breakpointhook__
2 participants