aio-libs / aio-libs/sphinxcontrib-asyncio

autodoc + classmethod coroutines do not play well together

Đang mở
#7 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
21
Fork
5
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Here's my code:
```python
class Test:
@classmethod
def a(cls):
"""yay"""
pass

@classmethod
async def b(cls):
"""yay"""
pass

async def c(self):
"""yay"""
pass

def d(self):
"""yay"""
pass
```

My doc:
```rst
.. autoclass:: module.Test
:members: a, b, c, d
```

Here's the generated rst:
```rst
.. py:class:: Test
:module: procrastinate.aiopg_connector


.. py:classmethod:: Test.a()
:module: procrastinate.aiopg_connector

yay


.. py:comethod:: Test.b()
:module: procrastinate.aiopg_connector

yay


.. py:comethod:: Test.c()
:module: procrastinate.aiopg_connector

yay


.. py:method:: Test.d()
:module: procrastinate.aiopg_connector

yay

```

Here's the output:
![Screenshot from 2020-02-21 14-59-04](https://user-images.githubusercontent.com/1457576/75040315-bbd26700-54ba-11ea-9e57-42770865ec6f.png)

As you can see, b fails to be shown as an async class method.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.