Skip to content

Commit 525da68

Browse files
authored
Fix indentation issue in TypedDict docs (#1963)
1 parent 75a5e9d commit 525da68

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/spec/typeddict.rst

+7-7
Original file line numberDiff line numberDiff line change
@@ -353,15 +353,15 @@ Discussion:
353353
x: int
354354
y: str
355355

356-
def f(a: A) -> None:
357-
a['y'] = 1
356+
def f(a: A) -> None:
357+
a['y'] = 1
358358

359-
def g(b: B) -> None:
360-
f(b) # Type check error: 'B' not assignable to 'A'
359+
def g(b: B) -> None:
360+
f(b) # Type check error: 'B' not assignable to 'A'
361361

362-
c: C = {'x': 0, 'y': 'foo'}
363-
g(c)
364-
c['y'] + 'bar' # Runtime error: int + str
362+
c: C = {'x': 0, 'y': 'foo'}
363+
g(c)
364+
c['y'] + 'bar' # Runtime error: int + str
365365

366366
* A TypedDict isn't :term:`assignable` to any ``Dict[...]`` type, since
367367
dictionary types allow destructive operations, including ``clear()``. They

0 commit comments

Comments
 (0)