@@ -159,7 +159,7 @@ that it is consistent with all of its associated overload signatures.
159159The implementation should accept all potential sets of arguments
160160that are accepted by the overloads and should produce all potential return
161161types produced by the overloads. In typing terms, this means the input
162- signature of the implementation should be :term: < assignable> to the input
162+ signature of the implementation should be :term: ` assignable ` to the input
163163signatures of all overloads, and the return type of all overloads should be
164164assignable to the return type of the implementation.
165165
@@ -174,7 +174,7 @@ should report an error::
174174 # This implementation is inconsistent with the second overload
175175 # because it does not accept a keyword argument ``x`` and the
176176 # the overload's return type ``int`` is not assignable to the
177- implementation's return type ``str``.
177+ # implementation's return type ``str``.
178178 def func(x: int | str, /) -> str:
179179 return str(x)
180180
@@ -244,7 +244,7 @@ When a type checker evaluates the call of an overloaded function, it
244244attempts to "match" the supplied arguments with one or more overloads.
245245This section describes the algorithm that type checkers should use
246246for overload matching. This algorithm should be applied even in the
247- presence of :ref: < overlapping overloads> .
247+ presence of :ref: ` overlapping overloads ` .
248248
249249Only the overloads (the ``@overload ``-decorated signatures) should be
250250considered for matching purposes. The implementation, if provided,
@@ -331,7 +331,7 @@ because there are possible materializations of ``list[Any]`` (for example,
331331Once this filtering process is applied for all arguments, examine the return
332332types of the remaining overloads. If these return types include type variables,
333333they should be replaced with their solved types. If the resulting return types
334- for all remaining overloads are :term: < equivalent> , proceed to step 6.
334+ for all remaining overloads are :term: ` equivalent ` , proceed to step 6.
335335
336336If the return types are not equivalent, overload matching is ambiguous. In
337337this case, assume a return type of ``Any `` and stop.
@@ -437,21 +437,21 @@ a union of a finite set of subtypes should be expanded into its constituent
437437subtypes. This includes the following cases.
438438
4394391. Explicit unions: Each subtype of the union should be considered as a
440- separate argument type. For example, the type ``int | str `` should be expanded
441- into ``int `` and ``str ``.
440+ separate argument type. For example, the type ``int | str `` should be expanded
441+ into ``int `` and ``str ``.
442442
4434432. ``bool `` should be expanded into ``Literal[True] `` and ``Literal[False] ``.
444444
4454453. ``Enum `` types (other than those that derive from ``enum.Flag ``) should
446- be expanded into their literal members.
446+ be expanded into their literal members.
447447
4484484. ``type[A | B] `` should be expanded into ``type[A] `` and ``type[B] ``.
449449
4504505. Tuples of known length that contain expandable types should be expanded
451- into all possible combinations of their element types. For example, the type
452- ``tuple[int | str, bool] `` should be expanded into ``(int, Literal[True]) ``,
453- ``(int, Literal[False]) ``, ``(str, Literal[True]) ``, and
454- ``(str, Literal[False]) ``.
451+ into all possible combinations of their element types. For example, the type
452+ ``tuple[int | str, bool] `` should be expanded into ``(int, Literal[True]) ``,
453+ ``(int, Literal[False]) ``, ``(str, Literal[True]) ``, and
454+ ``(str, Literal[False]) ``.
455455
456456The above list may not be exhaustive, and additional cases may be added in
457457the future as the type system evolves.
0 commit comments