Skip to content

Commit ff2f302

Browse files
Address remaining PR review comments from hugovk
1 parent 53edef4 commit ff2f302

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

peps/pep-0835.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Type: Standards Track
88
Topic: Typing
99
Created: 12-Jun-2026
1010
Python-Version: 3.16
11-
Post-History: 19-Apr-2026
11+
Post-History: `19-Apr-2026 <https://discuss.python.org/t/shorthand-syntax-for-annotated-type-metadata/106888>`__
1212

1313
Abstract
1414
========
1515

1616
This proposal introduces a shorthand syntax for ``typing.Annotated`` using the
1717
``@`` operator. This change reduces verbosity for type annotations with
18-
metadata, benefiting libraries like **Pydantic**, **FastAPI**, **Typer**, and
19-
**SQLModel**.
18+
metadata, benefiting libraries like Pydantic, FastAPI, Typer, and
19+
SQLModel.
2020

2121
Motivation
2222
==========
@@ -56,7 +56,10 @@ This creates a jarring experience. ``Annotated`` is core to the ecosystem but
5656
remains "hidden" and difficult to use directly. The proposed shorthand bridges
5757
this ergonomic gap. It restores the conciseness of earlier patterns while
5858
adhering to the modern ``Annotated`` standard. By reducing overhead, this
59-
proposal encourages developers to leverage the full power of type metadata::
59+
proposal encourages developers to leverage the full power of type metadata:
60+
61+
.. code-block:: python
62+
:class: good
6063
6164
from pydantic import BaseModel, Field
6265
from fastapi import Query

0 commit comments

Comments
 (0)