ruff/crates/red_knot_python_semantic
Chris Krycho fe8b15291f
red-knot: implement unary minus on integer literals (#13114)
# Summary

Add support for the first unary operator: negating integer literals. The
resulting type is another integer literal, with the value being the
negated value of the literal. All other types continue to return
`Type::Unknown` for the present, but this is designed to make it easy to
extend easily with other combinations of operator and operand.

Contributes to #12701.

## Test Plan

Add tests with basic negation, including of very large integers and
double negation.
2024-08-26 12:08:18 -07:00
..
src red-knot: implement unary minus on integer literals (#13114) 2024-08-26 12:08:18 -07:00
vendor/typeshed Sync vendored typeshed stubs (#12899) 2024-08-14 18:11:23 -07:00
build.rs [red-knot] Merge the semantic and module-resolver crates (#12751) 2024-08-08 15:34:11 +01:00
Cargo.toml Added bytes type and some inference (#13061) 2024-08-22 13:27:15 -07:00
README.md [red-knot] Merge the semantic and module-resolver crates (#12751) 2024-08-08 15:34:11 +01:00

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.