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

[blocked, autofix] RET504 Aggressive fixing #2788

Closed
Sawbez opened this issue Feb 12, 2023 · 0 comments
Closed

[blocked, autofix] RET504 Aggressive fixing #2788

Sawbez opened this issue Feb 12, 2023 · 0 comments
Labels
fixes Related to suggested fixes for violations

Comments

@Sawbez
Copy link
Contributor

Sawbez commented Feb 12, 2023

This relates to PR #2599 in which it is planned to have the fix work only for basic cases with comments and pretty much nothing else in between because some other cases break it.

Eventually once we have autofix levels (see #1992) we can add that option to not include the restrictions.

@charliermarsh charliermarsh added the fixes Related to suggested fixes for violations label Feb 12, 2023
konstin pushed a commit that referenced this issue Jun 13, 2023
## Summary

This PR enables autofix for the revised `RET504` rule, by changing:

```py
def f():
    x = 1
    return x
```

...to:

```py
def f():
    return 1
```

Closes #2263.

Closes #2788.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixes Related to suggested fixes for violations
Projects
None yet
Development

No branches or pull requests

2 participants