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

[Autofix error] Autofix error when comparing tuple #3620

Closed
qarmin opened this issue Mar 20, 2023 · 2 comments · Fixed by #3668
Closed

[Autofix error] Autofix error when comparing tuple #3620

qarmin opened this issue Mar 20, 2023 · 2 comments · Fixed by #3668
Labels
bug Something isn't working

Comments

@qarmin
Copy link

qarmin commented Mar 20, 2023

Ruff a45753f

def _detect_pathlib_path(p):
	if(3,4)<=sys.version_info:
	    pass

with

ruff file.py --fix
error: Autofix introduced a syntax error. Reverting all changes.

This indicates a bug in `ruff`. If you could open an issue at:

    https://github.com/charliermarsh/ruff/issues/new?title=%5BAutofix%20error%5D

...quoting the contents of `Desktop/RunEveryCommand/Ruff/Broken/45224decoder (20th copy)0.py`, along with the `pyproject.toml` settings and executed command, we'd be very appreciative!

@charliermarsh charliermarsh added the bug Something isn't working label Mar 20, 2023
@kyoto7250
Copy link
Contributor

kyoto7250 commented Mar 22, 2023

I want to make a PR for this issue.
I think this bug caused by E231.

@charliermarsh
Copy link
Member

That may be one part of the problem, though the other (I think) is that we end up inverting to:

def _detect_pathlib_path(p):
	ifsys.version_info>=(3,4):
	    pass

Which is a syntax error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants