Skip to content

Commit 6bb577e

Browse files
committed
Allow passed match callback to have different parameter names.
As the callback is called with positional arguments, the signature should reflect that.
1 parent 76f07b6 commit 6bb577e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/pyperscan/_pyperscan.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ class OnMatch(Protocol, Generic[_TContext_contra]):
176176
"""Callback called on match."""
177177

178178
def __call__(
179-
self, context: _TContext_contra, tag: Any, start: int, end: Any
179+
self, context: _TContext_contra, tag: Any, start: int, end: int, /
180180
) -> Scan:
181181
"""Called when a match happens.
182182
183183
Note:
184-
Call parameters are passed positonally.
184+
Call parameters are passed positionally.
185185
186186
Args:
187187
context: Object passed to [Database.build][pyperscan._pyperscan.Database.build]

0 commit comments

Comments
 (0)