From 1730e6b5afb11c9789934e4d8decd3d7743a5022 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 12 Feb 2026 14:21:08 +0000 Subject: [PATCH] For callable docstrings allow either std::function or Callback typedef --- docs/verify-docstrings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/verify-docstrings.py b/docs/verify-docstrings.py index 7d907d8ad..cfe70e07b 100644 --- a/docs/verify-docstrings.py +++ b/docs/verify-docstrings.py @@ -100,8 +100,8 @@ def make_c_type(ret: str, pattern: bool, typelist: List[str]): ret = 'rdcstrpairs' elif ret == 'Tuple[str,str]': # special case ret = 'rdcstrpair' - elif ret == 'Callable[[], None]': # callbacks with parameters or return type should have a *Callback typedef - ret = 'std::function' if pattern else 'std::function' + elif ret[0:9] == 'Callable[': + ret = '(std::function|[A-Za-z_]+Callback)' if pattern else 'std::function/NamedCallback' elif ret[0:5] == 'List[': inner = make_c_type(ret[5:-1], pattern, typelist) ret = '(const )?rdcarray<{}> ?[&*]?'.format(inner) if pattern else 'rdcarray<{}>'.format(inner)