From fdef68bb0cd686df277b0e2ec754bc5d52562813 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 4 Sep 2019 20:21:43 +0200 Subject: [PATCH] documentation/python: don't be so enthusiastic with pybind sig matching. --- documentation/python.py | 2 +- .../test_python/pybind_signatures/false_positives.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/python.py b/documentation/python.py index a1b02b94..b98b7395 100755 --- a/documentation/python.py +++ b/documentation/python.py @@ -1247,7 +1247,7 @@ def extract_function_doc(state: State, parent, entry: Empty) -> List[Any]: # # Some shitty packages might be setting __doc__ to None (attrs is one of # them), explicitly check for that first. - if state.config['PYBIND11_COMPATIBILITY'] and entry.object.__doc__ and entry.object.__doc__.startswith(entry.path[-1]): + if state.config['PYBIND11_COMPATIBILITY'] and entry.object.__doc__ and entry.object.__doc__.startswith(entry.path[-1] + '('): funcs = parse_pybind_docstring(state, entry.path, entry.object.__doc__) # The crawl (and object_type()) should have detected the overloadedness # already, so check that we have that consistent diff --git a/documentation/test_python/pybind_signatures/false_positives.html b/documentation/test_python/pybind_signatures/false_positives.html index 1ee37cf9..09aaa0eb 100644 --- a/documentation/test_python/pybind_signatures/false_positives.html +++ b/documentation/test_python/pybind_signatures/false_positives.html @@ -39,7 +39,7 @@
def reset()
-
resets everything
+
resets everything. Shouldn't be picked as a pybind signature.
-- 2.30.2