Merge branch '3.0.x' into 7401_broken_env-get-outdated

This commit is contained in:
Takeshi KOMIYA 2020-04-02 23:43:18 +09:00 committed by GitHub
commit e89787d4f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 2 deletions

View File

@ -32,6 +32,7 @@ Bugs fixed
* #7301: epub: duplicated node_ids are generated
* #6564: html: a width of table was ignored on HTML builder
* #7401: Incorrect argument is passed for :event:`env-get-outdated` handlers
* #7355: autodoc: a signature of cython-function is not recognized well
Testing
--------

View File

@ -1019,6 +1019,7 @@ class FunctionDocumenter(DocstringSignatureMixin, ModuleLevelDocumenter): # typ
if (not inspect.isfunction(self.object) and
not inspect.ismethod(self.object) and
not inspect.isbuiltin(self.object) and
not inspect.is_cython_function_or_method(self.object) and
not inspect.isclass(self.object) and
hasattr(self.object, '__call__')):
self.env.app.emit('autodoc-before-process-signature',

View File

@ -1,6 +1,6 @@
# cython: binding=True
def foo(*args, **kwargs):
def foo(x: int, *args, y: str, **kwargs):
"""Docstring."""

View File

@ -1641,7 +1641,7 @@ def test_cython():
' Docstring.',
'',
'',
'.. py:function:: foo(*args, **kwargs)',
'.. py:function:: foo(x: int, *args, y: str, **kwargs)',
' :module: target.cython',
'',
' Docstring.',