From 93e65e443eeac1e0f25a88b33851bb5239bab1a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Peder=20Brandtz=C3=A6g?= Date: Mon, 13 Nov 2023 16:51:26 +0100 Subject: [PATCH] Add missing language identifiers in changelog code snippets (#16475) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5523894a524..f28cdb1ccc25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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: ... ``` @@ -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