ruff/crates/red_knot_python_semantic/resources/mdtest/subscript
David Peter 56c796acee
[red-knot] Slice expression types & subscript expressions with slices (#13917)
## Summary

- Add a new `Type::SliceLiteral` variant
- Infer `SliceLiteral` types for slice expressions, such as
`<int-literal>:<int-literal>:<int-literal>`.
- Infer "sliced" literal types for subscript expressions using slices,
such as `<string-literal>[<slice-literal>]`.
- Infer types for expressions involving slices of tuples:
`<tuple>[<slice-literal>]`.

closes #13853

## Test Plan

- Unit tests for indexing/slicing utility functions
- Markdown-based tests for
  - Subscript expressions `tuple[slice]`
  - Subscript expressions `string_literal[slice]`
  - Subscript expressions `bytes_literal[slice]`
2024-10-29 10:17:31 +01:00
..
bytes.md [red-knot] Slice expression types & subscript expressions with slices (#13917) 2024-10-29 10:17:31 +01:00
class.md [red-knot] Format mdtest Python snippets more concisely (#13905) 2024-10-24 11:09:31 +00:00
instance.md [red-knot] Format mdtest Python snippets more concisely (#13905) 2024-10-24 11:09:31 +00:00
lists.md [red-knot] mdtest suite: formatting and cleanup (#13806) 2024-10-18 11:07:53 +02:00
stepsize_zero.md [red-knot] Slice expression types & subscript expressions with slices (#13917) 2024-10-29 10:17:31 +01:00
string.md [red-knot] Slice expression types & subscript expressions with slices (#13917) 2024-10-29 10:17:31 +01:00
tuple.md [red-knot] Slice expression types & subscript expressions with slices (#13917) 2024-10-29 10:17:31 +01:00