ruff/crates/ty
Douglas Creager 2c3b3d3230
[ty] Create separate FunctionLiteral and FunctionType types (#18360)
This updates our representation of functions to more closely match our
representation of classes.

The new `OverloadLiteral` and `FunctionLiteral` classes represent a
function definition in the AST. If a function is generic, this is
unspecialized. `FunctionType` has been updated to represent a function
type, which is specialized if the function is generic. (These names are
chosen to match `ClassLiteral` and `ClassType` on the class side.)

This PR does not add a separate `Type` variant for `FunctionLiteral`.
Maybe we should? Possibly as a follow-on PR?

Part of https://github.com/astral-sh/ty/issues/462

---------

Co-authored-by: Micha Reiser <micha@reiser.io>
2025-06-03 10:59:31 -04:00
..
docs [ty] Create separate FunctionLiteral and FunctionType types (#18360) 2025-06-03 10:59:31 -04:00
src [ty] Update docs for Python version inference (#18397) 2025-05-30 22:45:28 +01:00
tests [ty] Infer the Python version from the environment if feasible (#18057) 2025-05-30 21:22:51 +00:00
build.rs Parse dist-workspace.toml for version (#17868) 2025-05-06 12:18:17 +00:00
Cargo.toml [ty] Infer the Python version from the environment if feasible (#18057) 2025-05-30 21:22:51 +00:00
CONTRIBUTING.md [ty] contribution guide (#18061) 2025-05-13 10:55:01 +02:00
README.md [ty] contribution guide (#18061) 2025-05-13 10:55:01 +02:00

ty

ty is an extremely fast type checker. Currently, it is a work-in-progress and not ready for production use.

The Rust code for ty lives in this repository; see CONTRIBUTING.md for more information on contributing to ty.

See the ty repo for ty documentation and releases.