Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation typos #527

Merged
merged 1 commit into from
Oct 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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