|
11 | 11 | from collections.abc import Callable |
12 | 12 | from typing import Any, NamedTuple, cast |
13 | 13 |
|
14 | | -import pyrect # type: ignore[import] # TODO: Create type stubs or add to base library |
| 14 | +import pyrect # type: ignore[import] # pyright: ignore[reportMissingTypeStubs] # TODO: Create type stubs or add to base library |
15 | 15 |
|
16 | 16 |
|
17 | 17 | __all__ = [ |
@@ -79,17 +79,17 @@ class Re: |
79 | 79 | # Does not play well with static typing and current implementation of TypedDict |
80 | 80 | _cond_dic: dict[int, Callable[[str | re.Pattern[str], str, float], bool]] = { |
81 | 81 | IS: lambda s1, s2, fl: s1 == s2, |
82 | | - CONTAINS: lambda s1, s2, fl: s1 in s2, # type: ignore |
83 | | - STARTSWITH: lambda s1, s2, fl: s2.startswith(s1), # type: ignore |
84 | | - ENDSWITH: lambda s1, s2, fl: s2.endswith(s1), # type: ignore |
| 82 | + CONTAINS: lambda s1, s2, fl: s1 in s2, # type: ignore # pyright: ignore |
| 83 | + STARTSWITH: lambda s1, s2, fl: s2.startswith(s1), # type: ignore # pyright: ignore |
| 84 | + ENDSWITH: lambda s1, s2, fl: s2.endswith(s1), # type: ignore # pyright: ignore |
85 | 85 | NOTIS: lambda s1, s2, fl: s1 != s2, |
86 | | - NOTCONTAINS: lambda s1, s2, fl: s1 not in s2, # type: ignore |
87 | | - NOTSTARTSWITH: lambda s1, s2, fl: not s2.startswith(s1), # type: ignore |
88 | | - NOTENDSWITH: lambda s1, s2, fl: not s2.endswith(s1), # type: ignore |
89 | | - MATCH: lambda s1, s2, fl: bool(s1.search(s2)), # type: ignore |
90 | | - NOTMATCH: lambda s1, s2, fl: not (bool(s1.search(s2))), # type: ignore |
91 | | - EDITDISTANCE: lambda s1, s2, fl: _levenshtein(s1, s2) >= fl, # type: ignore |
92 | | - DIFFRATIO: lambda s1, s2, fl: difflib.SequenceMatcher(None, s1, s2).ratio() * 100 >= fl # type: ignore |
| 86 | + NOTCONTAINS: lambda s1, s2, fl: s1 not in s2, # type: ignore # pyright: ignore |
| 87 | + NOTSTARTSWITH: lambda s1, s2, fl: not s2.startswith(s1), # type: ignore # pyright: ignore |
| 88 | + NOTENDSWITH: lambda s1, s2, fl: not s2.endswith(s1), # type: ignore # pyright: ignore |
| 89 | + MATCH: lambda s1, s2, fl: bool(s1.search(s2)), # type: ignore # pyright: ignore |
| 90 | + NOTMATCH: lambda s1, s2, fl: not (bool(s1.search(s2))), # type: ignore # pyright: ignore |
| 91 | + EDITDISTANCE: lambda s1, s2, fl: _levenshtein(s1, s2) >= fl, # type: ignore # pyright: ignore |
| 92 | + DIFFRATIO: lambda s1, s2, fl: difflib.SequenceMatcher(None, s1, s2).ratio() * 100 >= fl # type: ignore # pyright: ignore |
93 | 93 | } |
94 | 94 |
|
95 | 95 |
|
|
0 commit comments