Blocked by mutating/sigmatch#17.
CI failure with the original bool filters:
https://github.com/mutating/cantok/actions/runs/28411635113/job/84185622935?pr=57#logs
AbstractToken.__repr__ uses lambdas only because bool currently raises
sigmatch.errors.SignatureNotFoundError through printo.describe_call on
Python 3.11.
After sigmatch supports matching built-in callables, replace the workaround:
diff --git a/cantok/tokens/abstract/abstract_token.py b/cantok/tokens/abstract/abstract_token.py
@@
filters={
- 0: lambda argument: bool(argument),
- 'cancelled': lambda argument: bool(argument),
+ 0: bool,
+ 'cancelled': bool,
'doc': not_none,
},
Verify on Python 3.11 that repr(SimpleToken()) == 'SimpleToken()' and the test
suite still passes.
Blocked by mutating/sigmatch#17.
CI failure with the original
boolfilters:https://github.com/mutating/cantok/actions/runs/28411635113/job/84185622935?pr=57#logs
AbstractToken.__repr__uses lambdas only becauseboolcurrently raisessigmatch.errors.SignatureNotFoundErrorthroughprinto.describe_callonPython 3.11.
After
sigmatchsupports matching built-in callables, replace the workaround:Verify on Python 3.11 that
repr(SimpleToken()) == 'SimpleToken()'and the testsuite still passes.