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

Failed to extract CST from source when fixing file with assertions #4403

Closed
qarmin opened this issue May 12, 2023 · 0 comments · Fixed by #4405
Closed

Failed to extract CST from source when fixing file with assertions #4403

qarmin opened this issue May 12, 2023 · 0 comments · Fixed by #4405
Assignees
Labels
bug Something isn't working

Comments

@qarmin
Copy link

qarmin commented May 12, 2023

Ruff f5be3d8

Command - ruff --fix with config with all rules enabled

assert False or False  # [condition-evals-to-constant]
assert True and True  # [condition-evals-to-constant]

cause to show error

error: Failed to create fix for PytestCompositeAssertion: Failed to extract CST from source
Desktop/RunEveryCommand/ruff/Broken/PY_FILE_TEST_1364702729.py:1:1: D100 Missing docstring in public module
Desktop/RunEveryCommand/ruff/Broken/PY_FILE_TEST_1364702729.py:1:1: S101 Use of `assert` detected
Desktop/RunEveryCommand/ruff/Broken/PY_FILE_TEST_1364702729.py:1:1: INP001 File `Desktop/RunEveryCommand/ruff/Broken/PY_FILE_TEST_1364702729.py` is part of an implicit namespace package. Add an `__init__.py`.
Desktop/RunEveryCommand/ruff/Broken/PY_FILE_TEST_1364702729.py:2:1: S101 Use of `assert` detected
Desktop/RunEveryCommand/ruff/Broken/PY_FILE_TEST_1364702729.py:2:1: PT018 Assertion should be broken down into multiple parts
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.

2 participants