Skip to content

[flake8-bandit] Permit suspicious imports within stub files (S4)#15822

Merged
dylwil3 merged 1 commit intoastral-sh:mainfrom
tjkuson:s4-ignore-stubs
Jan 30, 2025
Merged

[flake8-bandit] Permit suspicious imports within stub files (S4)#15822
dylwil3 merged 1 commit intoastral-sh:mainfrom
tjkuson:s4-ignore-stubs

Conversation

@tjkuson
Copy link
Copy Markdown
Contributor

@tjkuson tjkuson commented Jan 30, 2025

Summary

Permits suspicious imports (the S4 namespaced diagnostics) from stub files.

Closes #15207.

Test Plan

Added tests and ran cargo nextest run. The test files are copied from the .py variants.

@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.

Copy link
Copy Markdown
Collaborator

@dylwil3 dylwil3 left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

@dylwil3 dylwil3 added rule Implementing or modifying a lint rule preview Related to preview mode features labels Jan 30, 2025
@dylwil3 dylwil3 changed the title [flake8-bandit] Permit suspicious imports within stub files [flake8-bandit] Permit suspicious imports within stub files (S4) Jan 30, 2025
@dylwil3 dylwil3 merged commit 7a10a40 into astral-sh:main Jan 30, 2025
@tjkuson tjkuson deleted the s4-ignore-stubs branch January 30, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Related to preview mode features rule Implementing or modifying a lint rule

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flake8-bandit's S4 rules don't apply to stubs

2 participants