Skip to content

Commit c0cc0ab

Browse files
authored
Docs: Fix typo and grammar in type narrowing guide (#2271)
1 parent 81b183c commit c0cc0ab

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/guides/type_narrowing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ For example::
6363
print(f"{x} is not a cardinal direction")
6464

6565
A ``TypeGuard`` function looks similar and is used in the same way, but the
66-
type narrowing behavior is different, as dicussed in :ref:`the section below <guide-type-narrowing-typeis-typeguard>`.
66+
type narrowing behavior is different, as discussed in :ref:`the section below <guide-type-narrowing-typeis-typeguard>`.
6767

6868
Depending on the version of Python you are running, you will be able to
6969
import ``TypeIs`` and ``TypeGuard`` either from the standard library :py:mod:`typing`
@@ -143,7 +143,7 @@ Here is an example of a correct ``TypeIs`` function for a more complicated type:
143143
:py:data:`typing.TypeIs` and :py:data:`typing.TypeGuard` are both tools for narrowing the type of a variable
144144
based on a user-defined function. Both can be used to annotate functions that take an
145145
argument and return a boolean depending on whether the input argument is compatible with
146-
the narrowed type. These function can then be used in ``if`` checks to narrow the type
146+
the narrowed type. These functions can then be used in ``if`` checks to narrow the type
147147
of a variable.
148148

149149
``TypeIs`` usually has the more intuitive behavior, but it

0 commit comments

Comments
 (0)