From ad3bb68d88eef23c9f2ce2ad3765670bf05192ce Mon Sep 17 00:00:00 2001 From: Zac-HD Date: Sun, 10 Oct 2021 15:14:21 +1100 Subject: [PATCH] Fix m.OneOf() docs Closes #345. --- libcst/matchers/_matcher_base.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/libcst/matchers/_matcher_base.py b/libcst/matchers/_matcher_base.py index 9dc494008..28f5c5e9d 100644 --- a/libcst/matchers/_matcher_base.py +++ b/libcst/matchers/_matcher_base.py @@ -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: