An extremely fast Python linter and code formatter, written in Rust.
31.13k
stars
1.03k
forks
source link
[Linter panic] ruff 0.0.258: 'internal error: entered unreachable code: Expected docstring to start with a valid triple- or single-quote prefix', crates/ruff_python_ast/src/str.rs:38:5 #3678
Closed
XuehaiPan closed 1 year ago
Ref https://github.com/metaopt/optree/actions/runs/4497862525/jobs/7913866886, the step
pre-commit
(ruff
0.0.257 runs successfully), whileruff
0.0.258 reports panic.Create a new isolated virtual environment:
The panic is not always reproducible:
pyproject.toml
: https://github.com/metaopt/optree/blob/828749a91b985cb56fc0888c26939080be4f677d/pyproject.toml#L139-L227optree/typing.py
: https://github.com/metaopt/optree/blob/828749a91b985cb56fc0888c26939080be4f677d/optree/typing.pyAll docstrings are valid and start with triple-quotes. No panic was reported for the previous release
ruff
0.0.257.I have
in my configuration. Not sure if this is the cause here.