Skip to content

Commit

Permalink
Add missing language identifiers in changelog code snippets (#16475)
Browse files Browse the repository at this point in the history
Lets the Markdown renderer highlight the code as Python rather than
leaving it un-highlighted :–)

This PR does not change mypy, nor do I believe any tests should be
written, as it only affects the rendering of a few code snippets in the
changelog (other snippets further down in the changelog already use the
identifier).
  • Loading branch information
olepbr committed Nov 13, 2023
1 parent 023eb41 commit 93e65e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ You can read the full documentation for this release on [Read the Docs](http://m

Mypy now has support for using `Unpack[...]` with a TypedDict type to annotate `**kwargs` arguments enabled by default. Example:

```
```python
# Or 'from typing_extensions import ...'
from typing import TypedDict, Unpack

Expand All @@ -33,7 +33,7 @@ foo(name=1) # Error

The definition of `foo` above is equivalent to the one below, with keyword-only arguments `name` and `age`:

```
```python
def foo(*, name: str, age: int) -> None:
...
```
Expand Down Expand Up @@ -94,7 +94,7 @@ The new type inference algorithm was contributed by Ivan Levkivskyi. PR [16345](

Mypy now can narrow tuple types using `len()` checks. Example:

```
```python
def f(t: tuple[int, int] | tuple[int, int, int]) -> None:
if len(t) == 2:
a, b = t # Ok
Expand Down

0 comments on commit 93e65e4

Please sign in to comment.