Skip to content

Commit

Permalink
fix(patterns): fix pattern mismatch error for default Pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrist authored and kszucs committed Sep 28, 2023
1 parent a64b7ad commit f68079a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ibis/common/patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def is_match(self, value: AnyType, context: dict[str, AnyType]) -> bool:
return self.match(value, context) is not NoMatch

def describe(self, plural=False):
return "matching {self!r}"
return f"matching {self!r}"

@abstractmethod
def __eq__(self, other: Pattern) -> bool:
Expand Down
1 change: 1 addition & 0 deletions ibis/common/tests/test_patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def test_any():
p = Any()
assert p.match(1, context={}) == 1
assert p.match("foo", context={}) == "foo"
assert p.describe() == "matching Any()"


def test_variable():
Expand Down

0 comments on commit f68079a

Please sign in to comment.