astral-sh / ruff

An extremely fast Python linter and code formatter, written in Rust.

Home Page:https://docs.astral.sh/ruff

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Migrate `sys.rs` generation to `stdlibs`

charliermarsh opened this issue · comments

This was brought to my attention via email. We have a script to generate https://github.com/astral-sh/ruff/blob/main/crates/ruff_python_stdlib/src/sys.rs, and it does this by polling (e.g.) https://docs.python.org/3.10/objects.inv.

There's a nice Python library we can use instead of objects.inv, which (IIUC) catches a bunch of other modules that aren't present there (e.g., _ssl): https://github.com/omnilib/stdlibs