ruff/crates/ty/docs
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
..
.gitattributes [ty] Mark generated files as such in .gitattributes (#18195) 2025-05-19 16:50:48 +02:00
cli.md [ty] Update docs for Python version inference (#18397) 2025-05-30 22:45:28 +01:00
configuration.md [ty] Move respect-ignore-files under src section (#18322) 2025-05-26 18:45:48 +01:00
mypy_primer.md Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
rules.md [ty] Create separate FunctionLiteral and FunctionType types (#18360) 2025-06-03 10:59:31 -04:00
tracing-flamegraph.png Rename Red Knot (#17820) 2025-05-03 19:49:15 +02:00
tracing.md [ty] Minor typo in environment variable name (#17848) 2025-05-05 10:25:48 +00:00