Skip to content

Commit

Permalink
[red-knot] Format mdtest snippets with the latest version of black (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWaygood authored Jan 29, 2025
1 parent 15d886a commit 3125332
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions crates/red_knot_python_semantic/resources/mdtest/unpacking.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 3125332

Please sign in to comment.