Skip to content

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

Merged
ntBre merged 2 commits into
mainfrom
brent/t100-breakpointhook
Feb 16, 2025
Merged

[flake8-debugger] Also flag sys.breakpointhook and sys.__breakpointhook__ (T100)#16191
ntBre merged 2 commits into
mainfrom
brent/t100-breakpointhook

Conversation

@ntBre

@ntBre ntBre commented Feb 16, 2025

Copy link
Copy Markdown
Contributor

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
@github-actions

Copy link
Copy Markdown
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
@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