Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
MapleCCC committed Oct 1, 2021
1 parent 71b8002 commit 8663b3d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/source/matchers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ defining what attributes on a node matter when matching against predefined patte

To accomplish this, a matcher has been created which corresponds to each LibCST
node documented in :ref:`libcst-nodes`. Matchers default each of their attributes
to the special sentinal matcher :func:`~libcst.matchers.DoNotCare`. When constructing
to the special sentinel matcher :func:`~libcst.matchers.DoNotCare`. When constructing
a matcher, you can initialize the node with only the values of attributes that
you are concerned with, leaving the rest of the attributes set to
:func:`~libcst.matchers.DoNotCare` in order to skip comparing against them.
Expand Down Expand Up @@ -79,7 +79,7 @@ Traversal Order
^^^^^^^^^^^^^^^

Visit and leave functions created using :func:`~libcst.matchers.visit` or
:func:`~libcst.matchers.leave` follow the traveral order rules laid out in
:func:`~libcst.matchers.leave` follow the traversal order rules laid out in
LibCST's visitor :ref:`libcst-visitor-traversal` with one additional rule. Any
visit function created using the :func:`~libcst.matchers.visit` decorator will be
called **before** a ``visit_<Node>`` function if it is defined for your visitor.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/matchers_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
"into your :ref:`libcst-visitors` in order to identify which nodes you care ",
"about. Matcher :ref:`libcst-matcher-decorators` help reduce that boilerplate.\n",
"\n",
"Say you wanted to invert the the boolean literals in functions which ",
"Say you wanted to invert the boolean literals in functions which ",
"match the above ``best_is_call_with_booleans``. You could build something ",
"that looks like the following:"
]
Expand Down
4 changes: 2 additions & 2 deletions docs/source/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
" self.stack: List[Tuple[str, ...]] = []\n",
" # store the annotations\n",
" self.annotations: Dict[\n",
" Tuple[str, ...], # key: tuple of cononical class/function name\n",
" Tuple[str, ...], # key: tuple of canonical class/function name\n",
" Tuple[cst.Parameters, Optional[cst.Annotation]], # value: (params, returns)\n",
" ] = {}\n",
"\n",
Expand All @@ -140,7 +140,7 @@
" self.stack: List[Tuple[str, ...]] = []\n",
" # store the annotations\n",
" self.annotations: Dict[\n",
" Tuple[str, ...], # key: tuple of cononical class/function name\n",
" Tuple[str, ...], # key: tuple of canonical class/function name\n",
" Tuple[cst.Parameters, Optional[cst.Annotation]], # value: (params, returns)\n",
" ] = annotations\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion libcst/matchers/_matcher_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1711,7 +1711,7 @@ def findall(
or a :class:`OneOf`/:class:`AllOf` special matcher. Unlike :func:`matches`, it can
also be a :class:`MatchIfTrue` or :func:`DoesNotMatch` matcher, since we are
traversing the tree looking for matches. It cannot be a :class:`AtLeastN` or
:class:`AtMostN` matcher because these types are wildcards which can only be usedi
:class:`AtMostN` matcher because these types are wildcards which can only be used
inside sequences.
"""
nodes, _ = _find_or_extract_all(tree, matcher, metadata_resolver=metadata_resolver)
Expand Down

0 comments on commit 8663b3d

Please sign in to comment.