Skip to content
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

Exempt unittest context methods for SIM115 rule #16439

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

adamchainz
Copy link
Contributor

Summary

Exempt calls to the three context methods in unittest, allowing some false positives where identical method names are used.

Closes #16438.

Test Plan

Added test cases to Python file, updated snapshots.

Copy link
Contributor

github-actions bot commented Feb 28, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Thank you!

co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
@AlexWaygood AlexWaygood added bug Something isn't working rule Implementing or modifying a lint rule labels Feb 28, 2025
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Thank you!

@AlexWaygood AlexWaygood merged commit 5ca6cc2 into astral-sh:main Feb 28, 2025
21 checks passed
@adamchainz adamchainz deleted the adamchainz/sim115 branch February 28, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SIM115 should exempt unittest.TestCase.enterContext() and enterClassContext()
2 participants