Skip to content
Prev Previous commit
Next Next commit
Colons
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
  • Loading branch information
AlexWaygood and sobolevn authored Jun 5, 2023
commit 9f132e9fdb381d0589086a9800000a9cecb2e2df
6 changes: 3 additions & 3 deletions Lib/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2225,7 +2225,7 @@ def get_origin(tp):
"""Get the unsubscripted version of a type.

This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar
Annotated, and others. Return None for unsupported types. Examples:
Annotated, and others. Return None for unsupported types. Examples::

assert get_origin(Literal[42]) is Literal
assert get_origin(int) is None
Expand Down Expand Up @@ -2384,7 +2384,7 @@ def overload(func):
"""Decorator for overloaded functions/methods.

In a stub file, place two or more stub definitions for the same
function in a row, each decorated with @overload. For example:
function in a row, each decorated with @overload. For example::

@overload
def utf8(value: None) -> None: ...
Expand All @@ -2395,7 +2395,7 @@ def utf8(value: str) -> bytes: ...

In a non-stub file (i.e. a regular .py file), do the same but
follow it with an implementation. The implementation should *not*
be decorated with @overload. For example:
be decorated with @overload. For example::

@overload
def utf8(value: None) -> None: ...
Expand Down