File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ For example::
6363 print(f"{x} is not a cardinal direction")
6464
6565A ``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
6868Depending on the version of Python you are running, you will be able to
6969import ``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
144144based on a user-defined function. Both can be used to annotate functions that take an
145145argument 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
147147of a variable.
148148
149149``TypeIs `` usually has the more intuitive behavior, but it
You can’t perform that action at this time.
0 commit comments