diff --git a/docs/source/matchers.rst b/docs/source/matchers.rst index ae67516a6..a89a1a683 100644 --- a/docs/source/matchers.rst +++ b/docs/source/matchers.rst @@ -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. @@ -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_`` function if it is defined for your visitor. diff --git a/docs/source/matchers_tutorial.ipynb b/docs/source/matchers_tutorial.ipynb index 1add7bcaa..6222bf7ff 100644 --- a/docs/source/matchers_tutorial.ipynb +++ b/docs/source/matchers_tutorial.ipynb @@ -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:" ] diff --git a/docs/source/tutorial.ipynb b/docs/source/tutorial.ipynb index 29e598084..a7c3cd6bd 100644 --- a/docs/source/tutorial.ipynb +++ b/docs/source/tutorial.ipynb @@ -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", @@ -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", diff --git a/libcst/matchers/_matcher_base.py b/libcst/matchers/_matcher_base.py index 8eeb1fb31..9dc494008 100644 --- a/libcst/matchers/_matcher_base.py +++ b/libcst/matchers/_matcher_base.py @@ -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)