From 1c7a4c24dd129850c23da5aa0d219c4f8c0e38cc Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 11 Feb 2025 00:21:39 +0000 Subject: [PATCH] Unwrap staticmethod if necessary when checking python docstrings * Happens on github CI for some reason. --- docs/verify-docstrings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/verify-docstrings.py b/docs/verify-docstrings.py index fb0cc4ae9..0fc4e1924 100644 --- a/docs/verify-docstrings.py +++ b/docs/verify-docstrings.py @@ -140,6 +140,9 @@ def check_function(parent_name, objname, obj, source, global_func, typelist): if args.verbose: print("Checking {} function {}.{}".format('global' if global_func else 'member', parent_name, objname)) + if obj.__class__ is staticmethod: + obj = obj.__func__ + docstring = obj.__doc__ params = PARAM_PATTERN.findall(docstring)