Add package metadata for the NumPy and JAX stubs Summary: Users have asked for the shape-aware NumPy stubs to be installable from PyPI, the way `pyrefly-torch-stubs` already is. Today the only way to get them is to copy the `tensor-shapes/` directory into your project. Add the standalone `pyrefly-numpy-stubs` package metadata and PEP 561 marker so the stubs can be built as a pure-Python stub-only wheel and sdist. This mirrors `pyrefly-torch-stubs` exactly: the package installs only the `numpy-stubs` tree and depends on the matching `pyrefly-shape-extensions` version. Because the distribution ships `numpy-stubs/` rather than `numpy/`, it is a PEP 561 stub package for the runtime `numpy` distribution and never shadows NumPy itself, so it can be co-installed with real NumPy. The same metadata is added for `pyrefly-jax-stubs`, so the three stub packages stay in step rather than the JAX one drifting until someone needs it. It is deliberately **not** added to `build_shape_stubs.yml`, and so is not published: the `pyrefly-jax-stubs` name on PyPI is already taken by someone else, and that needs to be resolved with them before we can release under it. The build and publish workflows enumerate their packages explicitly rather than globbing, so nothing picks this up implicitly; a later diff wires it in once the name question is settled. The `pyproject.toml` says as much at the top, so the omission does not read as an oversight. Differential Revision: D117271678
Pyrefly is a type checker and language server for Python, which provides lightning-fast type checking along with IDE features such as code navigation, semantic highlighting, and code completion. It is available as a command-line tool and an extension for popular IDEs and editors such as VSCode, Neovim, Zed, and more.
See the Pyrefly website for full documentation and how to add Pyrefly to your editor of choice.
Pyrefly's current development status is stable.
pyrefly init, silence existing errors with pyrefly suppress, and generate type annotations with pyrefly infer. Start with one file and expand at your own pace.pip install pyreflyPyrefly releases new minor versions (1.x.0) monthly and patch versions in between as-needed for critical fixes. Pyrefly does not follow strict semantic versioning: minor versions contain more significant changes than patch versions, but any version may introduce new type errors and other breaking changes. The pyrefly suppress command can be used to easily silence errors when upgrading to a new version.
If you have questions or would like to report a bug, please create an issue.
See our contributing guide and architecture overview for information on how to contribute to Pyrefly.
Join our Discord to chat about Pyrefly and types. This is also where we hold biweekly office hours.