ruff/crates/red_knot_python_semantic/resources/mdtest/annotations
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
..
annotated.md [red-knot] Emit an error if a bare Annotated or Literal is used in a type expression (#14973) 2024-12-15 02:00:52 +00:00
any.md [red-knot] Understand Annotated (#14950) 2024-12-13 09:41:37 -08:00
deferred.md [red-knot] Enforce specifying paths for mdtest code blocks in a separate preceding line (#15890) 2025-02-04 08:27:17 +01:00
literal.md [red-knot] Enforce specifying paths for mdtest code blocks in a separate preceding line (#15890) 2025-02-04 08:27:17 +01:00
literal_string.md [red-knot] Migrate bool/str/repr unit tests to Markdown tests (#15534) 2025-01-16 11:21:56 -08:00
never.md [red-knot] Statically known branches (#15019) 2024-12-21 11:33:10 +01:00
optional.md Understand typing.Optional in annotations (#14397) 2024-11-17 17:04:58 +00:00
starred.md [red-knot] function parameter types (#14802) 2024-12-06 12:55:56 -08:00
stdlib_typing_aliases.md [red-knot] Basic support for other legacy typing aliases (#14998) 2024-12-17 09:33:15 +00:00
string.md Parse triple quoted string annotations as if parenthesized (#15387) 2025-01-16 11:38:15 +05:30
union.md [red-knot] support typing.Union in type annotations (#14499) 2024-11-20 21:55:33 +00:00
unsupported_special_forms.md [red-knot] Basic support for other legacy typing aliases (#14998) 2024-12-17 09:33:15 +00:00
unsupported_type_qualifiers.md [red-knot] Initial tests for instance attributes (#15474) 2025-01-15 14:43:41 +00:00