chiark / gitweb /
documentation/python: don't be so enthusiastic with pybind sig matching.
authorVladimír Vondruš <mosra@centrum.cz>
Wed, 4 Sep 2019 18:21:43 +0000 (20:21 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Thu, 5 Sep 2019 16:25:42 +0000 (18:25 +0200)
documentation/python.py
documentation/test_python/pybind_signatures/false_positives.html

index a1b02b947381c26d280048746f24343c873f1b6c..b98b739587562aeb8fd0a0a8382f4b2e72e582a0 100755 (executable)
@@ -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
index 1ee37cf9f5a93ee982d946d7bbc4c987b2c46285..09aaa0eb22210e7189d6723aa69ad6026135dc92 100644 (file)
@@ -39,7 +39,7 @@
             <dt id="reset">
               <span class="m-doc-wrap-bumper">def <a href="#reset" class="m-doc-self">reset</a>(</span><span class="m-doc-wrap">)</span>
             </dt>
-            <dd>resets everything</dd>
+            <dd>resets everything. Shouldn&#x27;t be picked as a pybind signature.</dd>
           </dl>
         </section>
       </div>