Skip to content

Commit

Permalink
Fix m.OneOf() docs
Browse files Browse the repository at this point in the history
Closes #345.
  • Loading branch information
Zac-HD committed Oct 10, 2021
1 parent 13485d3 commit ad3bb68
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions libcst/matchers/_matcher_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,6 @@ class OneOf(Generic[_MatcherT], BaseMatcherNode):
m.Name("True") | m.Name("False")
Note that a :class:`OneOf` matcher can be used anywhere you are defining
a matcher attribute. So, an alternate form to the first example looks like::
m.Name(m.OneOf("True", "False"))
A downside to the alternate form is that you can no longer use Python's
bitwise or operator to construct the :class:`OneOf` since it is not defined
for strings. However, the upside is that it is more concise. We do not
recommend any one form over the other, and leave it up to you to decide what
is best for your use case.
"""

def __init__(self, *options: Union[_MatcherT, "OneOf[_MatcherT]"]) -> None:
Expand Down

0 comments on commit ad3bb68

Please sign in to comment.