mirror of https://github.com/astral-sh/ruff
[red-knot] Format mdtest snippets with the latest version of black (#15819)
This commit is contained in:
parent
15d886a502
commit
3125332ec1
|
|
@ -56,7 +56,7 @@ repos:
|
|||
.*?invalid(_.+)*_syntax\.md
|
||||
)$
|
||||
additional_dependencies:
|
||||
- black==24.10.0
|
||||
- black==25.1.0
|
||||
|
||||
- repo: https://github.com/crate-ci/typos
|
||||
rev: v1.29.4
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ def union_example(
|
|||
Literal["B"],
|
||||
Literal[True],
|
||||
None,
|
||||
]
|
||||
],
|
||||
):
|
||||
reveal_type(x) # revealed: Unknown | Literal[-1, "A", b"A", b"\x00", b"\x07", 0, 1, "B", "foo", "bar", True] | None
|
||||
```
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ b = a / 0
|
|||
```py
|
||||
"""
|
||||
File level suppressions must come before any non-trivia token,
|
||||
including module docstrings.
|
||||
including module docstrings.
|
||||
"""
|
||||
|
||||
# error: [unused-ignore-comment] "Unused blanket `type: ignore` directive"
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ reveal_type(b) # revealed: Unknown
|
|||
|
||||
```py
|
||||
# error: [invalid-assignment] "Not enough values to unpack (expected 2, got 1)"
|
||||
(a, b) = "\u9E6C"
|
||||
(a, b) = "\u9e6c"
|
||||
|
||||
reveal_type(a) # revealed: LiteralString
|
||||
reveal_type(b) # revealed: Unknown
|
||||
|
|
@ -292,7 +292,7 @@ reveal_type(b) # revealed: Unknown
|
|||
|
||||
```py
|
||||
# error: [invalid-assignment] "Not enough values to unpack (expected 2, got 1)"
|
||||
(a, b) = "\U0010FFFF"
|
||||
(a, b) = "\U0010ffff"
|
||||
|
||||
reveal_type(a) # revealed: LiteralString
|
||||
reveal_type(b) # revealed: Unknown
|
||||
|
|
@ -301,7 +301,7 @@ reveal_type(b) # revealed: Unknown
|
|||
### Surrogates
|
||||
|
||||
```py
|
||||
(a, b) = "\uD800\uDFFF"
|
||||
(a, b) = "\ud800\udfff"
|
||||
|
||||
reveal_type(a) # revealed: LiteralString
|
||||
reveal_type(b) # revealed: LiteralString
|
||||
|
|
|
|||
Loading…
Reference in New Issue