ruff/crates
David Peter b01a651e69
[red-knot] Support for TOML configs in Markdown tests (#14785)
## Summary

This adds support for specifying the target Python version from a
Markdown test. It is a somewhat limited ad-hoc solution, but designed to
be future-compatible. TOML blocks can be added to arbitrary sections in
the Markdown block. They have the following format:

````markdown
```toml
[tool.knot.environment]
target-version = "3.13"
```
````

So far, there is nothing else that can be configured, but it should be
straightforward to extend this to things like a custom typeshed path.

This is in preparation for the statically-known branches feature where
we are going to have to specify the target version for lots of tests.

## Test Plan

- New Markdown test that fails without the explicitly specified
`target-version`.
- Manually tested various error paths when specifying a wrong
`target-version` field.
- Made sure that running tests is as fast as before.
2024-12-06 10:22:08 +01:00
..
red_knot Possible fix for flaky file watching test (#14543) 2024-12-03 08:22:42 +01:00
red_knot_python_semantic [red-knot] Support for TOML configs in Markdown tests (#14785) 2024-12-06 10:22:08 +01:00
red_knot_server Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
red_knot_test [red-knot] Support for TOML configs in Markdown tests (#14785) 2024-12-06 10:22:08 +01:00
red_knot_vendored Sync vendored typeshed stubs (#14696) 2024-12-01 01:38:31 +00:00
red_knot_wasm Add tests for python version compatibility (#14430) 2024-11-18 12:26:55 +00:00
red_knot_workspace Possible fix for flaky file watching test (#14543) 2024-12-03 08:22:42 +01:00
ruff Fix infinite watch loop by ignoring 'uninteresting' watch events (#14809) 2024-12-06 08:50:29 +00:00
ruff_benchmark Fix Red Knot benchmarks on Windows (#14400) 2024-11-17 16:21:09 +00:00
ruff_cache
ruff_db Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
ruff_dev
ruff_diagnostics Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
ruff_formatter Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
ruff_graph
ruff_index
ruff_linter [flake8-pyi] Skip all type definitions in string-or-bytes-too-long (PYI053) (#14797) 2024-12-05 18:48:54 -06:00
ruff_macros Use a derive macro for Violations (#14557) 2024-11-27 09:41:40 +00:00
ruff_notebook
ruff_python_ast [ruff] Unnecessary cast to int (RUF046) (#14697) 2024-12-05 10:30:06 +01:00
ruff_python_ast_integration_tests Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
ruff_python_codegen
ruff_python_formatter Update pre-commit dependencies (#14719) 2024-12-02 06:02:56 +00:00
ruff_python_index
ruff_python_literal Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
ruff_python_parser Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
ruff_python_resolver Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
ruff_python_semantic [ruff] Implemented used-dummy-variable (RUF052) (#14611) 2024-12-03 08:36:16 +01:00
ruff_python_stdlib [ruff] Implemented used-dummy-variable (RUF052) (#14611) 2024-12-03 08:36:16 +01:00
ruff_python_trivia
ruff_python_trivia_integration_tests Update insta snapshots (#14366) 2024-11-15 19:31:15 +01:00
ruff_server Upgrade Rust toolchain to 1.83 (#14677) 2024-11-29 12:05:05 +00:00
ruff_source_file
ruff_text_size
ruff_wasm Bump version to 0.8.2 (#14789) 2024-12-05 18:06:35 +05:30
ruff_workspace [flake8-import-conventions] Improve syntax check for aliases supplied in configuration for unconventional-import-alias (ICN001) (#14745) 2024-12-02 22:41:47 -06:00