Skip to content

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

@qarmin

Description

@qarmin

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions