astral-sh / ruff

An extremely fast Python linter and code formatter, written in Rust.
https://docs.astral.sh/ruff
MIT License
30.94k stars 1.02k forks source link

Implement flake8-pydantic #12702

Open nakashima-hikaru opened 1 month ago

nakashima-hikaru commented 1 month ago

Is there any plan to support flake8-pydantic? This plugin can be found in pydantic official site.

Viicos commented 1 month ago

I will eventually work on this. One drawback I encountered when implementing rules using the AST is class detection. I'm hoping we could leverage the new red knot API at some point.

MichaReiser commented 1 month ago

It will take quiet some time before the red knot APIs are available in Ruff.

We generally avoid implementing rules that have a high false negative rate, e.g. because they require multifile analysis because they give user a false sense of safety. That's why I think we shouldn't implement rules requiring multifile analysis to be reasonably accurate today.