Skip to content

Check for use of debugpy and ptvsd debug modules (#10177)#10194

Merged
charliermarsh merged 1 commit into
astral-sh:mainfrom
jeremy-hiatt:add-debug-modules-to-t100
Mar 2, 2024
Merged

Check for use of debugpy and ptvsd debug modules (#10177)#10194
charliermarsh merged 1 commit into
astral-sh:mainfrom
jeremy-hiatt:add-debug-modules-to-t100

Conversation

@jeremy-hiatt
Copy link
Copy Markdown
Contributor

Summary

This addresses #10177.

Test Plan

I added additional lines to the existing test file for T100.

Comment on lines +112 to +113
| ["debugpy", "breakpoint" | "listen" | "wait_for_client"]
| ["ptvsd", "break_into_debugger" | "wait_for_attach"]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to pick the API methods that looked like they would be most commonly used based on the documentation:
https://github.com/microsoft/debugpy/?tab=readme-ov-file#debugpy-import-usage
https://github.com/microsoft/ptvsd?tab=readme-ov-file#ptvsd-import-usage

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spot-checked, makes sense to me.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 2, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@jeremy-hiatt jeremy-hiatt force-pushed the add-debug-modules-to-t100 branch from 21ebf18 to cc56dd2 Compare March 2, 2024 03:04
Copy link
Copy Markdown
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you!

@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Mar 2, 2024
@charliermarsh charliermarsh merged commit c007b17 into astral-sh:main Mar 2, 2024
nkxxll pushed a commit to nkxxll/ruff that referenced this pull request Mar 10, 2024
astral-sh#10194)

## Summary

This addresses astral-sh#10177.

## Test Plan

I added additional lines to the existing test file for T100.
alexrashed added a commit to localstack/localstack that referenced this pull request Mar 12, 2024
ruff 0.3.1 added linting rules to alert on the usage of debugpy
with astral-sh/ruff#10194.
This commit excludes these lines because it's used for a specific
feature (instead of debugging code leaking into the codebase).
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.

2 participants