Closed dhruvmanila closed 3 days ago
ruff-ecosystem
results✅ ecosystem check detected no linter changes.
ℹ️ ecosystem check encountered linter errors. (no lint changes; 1 project error)
ruff check --no-cache --exit-zero --ignore RUF9 --output-format concise --preview
``` warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`: - 'ignore' -> 'lint.ignore' - 'select' -> 'lint.select' - 'unfixable' -> 'lint.unfixable' - 'per-file-ignores' -> 'lint.per-file-ignores' warning: `PGH001` has been remapped to `S307`. warning: `PGH002` has been remapped to `G010`. warning: `PLR1701` has been remapped to `SIM101`. ruff failed Cause: Selection of deprecated rule `E999` is not allowed when preview is enabled. ```
✅ ecosystem check detected no format changes.
ℹ️ ecosystem check encountered format errors. (no format changes; 1 project error)
ruff format --preview --exclude Packs/ThreatQ/Integrations/ThreatQ/ThreatQ.py
``` warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`: - 'ignore' -> 'lint.ignore' - 'select' -> 'lint.select' - 'unfixable' -> 'lint.unfixable' - 'per-file-ignores' -> 'lint.per-file-ignores' warning: `PGH001` has been remapped to `S307`. warning: `PGH002` has been remapped to `G010`. warning: `PLR1701` has been remapped to `SIM101`. ruff failed Cause: Selection of deprecated rule `E999` is not allowed when preview is enabled. ```
This PR reverts https://github.com/astral-sh/ruff/pull/12016 with a small change where the error location points to the continuation character only. Earlier, it would also highlight the whitespace that came before it.
The motivation for this change is to avoid panic in https://github.com/astral-sh/ruff/pull/11950. For example:
Playground: https://play.ruff.rs/87711071-1b54-45a3-b45a-81a336a1ea61
The range of
Unknown
token andRpar
is the same. Once #11950 is enabled, the indexer would panic. It won't panic in the stable version because we stop at the firstUnknown
token.