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

feat(ERA001): detect single-line code for try:, except:, etc. #10057

Merged

Conversation

ottaviohartman
Copy link
Contributor

Summary

Fixes #10056.

Adds more cases to the ERA001 eradicate rule:

  • add single-line detection for eradicate rule.
  • add bare except: handling.

Test Plan

  • Unit tested

@ottaviohartman ottaviohartman changed the title ERA001: detect single-line code for try:, except:, etc. feat(ERA001): detect single-line code for try:, except:, etc. Feb 20, 2024
@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label Feb 20, 2024
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Copy link
Member

@MichaReiser MichaReiser left a comment

Choose a reason for hiding this comment

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

Nice thank you

@MichaReiser MichaReiser merged commit 0f70c99 into astral-sh:main Feb 20, 2024
17 checks passed
nkxxll pushed a commit to nkxxll/ruff that referenced this pull request Mar 10, 2024
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.

ERA001: detect single-line code for try:, except:, etc.
3 participants