ruff/crates/red_knot_python_semantic/resources/mdtest/comparison
InSync 11cfe2ea8a
[red-knot] Enforce specifying paths for mdtest code blocks in a separate preceding line (#15890)
## Summary

Resolves #15695, rework of #15704.

This change modifies the Mdtests framework so that:

* Paths must now be specified in a separate preceding line:

	`````markdown
	`a.py`:

	```py
	x = 1
	```
	`````

If the path of a file conflicts with its `lang`, an error will be
thrown.

* Configs are no longer accepted. The pattern still take them into
account, however, to avoid "Unterminated code block" errors.
* Unnamed files are now assigned unique, `lang`-respecting paths
automatically.

Additionally, all legacy usages have been updated.

## Test Plan

Unit tests and Markdown tests.

---------

Co-authored-by: Carl Meyer <carl@astral.sh>
2025-02-04 08:27:17 +01:00
..
instances Improve mdtests style (#14884) 2024-12-10 13:05:51 +00:00
byte_literals.md [red-knot] have mdformat wrap mdtest files to 100 columns (#14020) 2024-10-31 21:00:51 +00:00
identity.md Improve mdtests style (#14884) 2024-12-10 13:05:51 +00:00
integers.md Improve mdtests style (#14884) 2024-12-10 13:05:51 +00:00
intersections.md [red-knot] Add missing imports in mdtests (#15869) 2025-02-03 09:27:29 +00:00
non_bool_returns.md [red-knot] More precise inference for chained boolean expressions (#15089) 2024-12-22 10:02:28 -08:00
strings.md Improve mdtests style (#14884) 2024-12-10 13:05:51 +00:00
tuples.md [red-knot] Enforce specifying paths for mdtest code blocks in a separate preceding line (#15890) 2025-02-04 08:27:17 +01:00
unions.md Improve mdtests style (#14884) 2024-12-10 13:05:51 +00:00
unsupported.md Display Union of Literals as a Literal (#14993) 2025-01-08 00:58:38 +00:00