mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-19 01:51:30 +00:00
![]() ## Summary - Introduce methods for inferring annotation and type expressions. - Correctly infer explicit return types from functions where they are simple names that can be resolved in scope. Contributes to #12701 by way of helping unlock call expressions (this does not remotely finish that, as it stands, but it gets us moving that direction). ## Test Plan Added a test for function return types which use the name form of an annotation expression, since this is aiming toward call expressions. When we extend this to working for other annotation and type expression positions, we should add explicit tests for those as well. --------- Co-authored-by: Alex Waygood <alex.waygood@gmail.com> Co-authored-by: Carl Meyer <carl@astral.sh> |
||
---|---|---|
.. | ||
src | ||
vendor/typeshed | ||
build.rs | ||
Cargo.toml | ||
README.md |
Red Knot
Semantic analysis for the red-knot project.
Vendored types for the stdlib
This crate vendors typeshed's stubs for the standard library. The vendored stubs can be found in crates/red_knot_python_semantic/vendor/typeshed
. The file crates/red_knot_python_semantic/vendor/typeshed/source_commit.txt
tells you the typeshed commit that our vendored stdlib stubs currently correspond to.
The typeshed stubs are updated every two weeks via an automated PR using the sync_typeshed.yaml
workflow in the .github/workflows
directory. This workflow can also be triggered at any time via workflow dispatch.