-
-
Notifications
You must be signed in to change notification settings - Fork 201
Open
Labels
Description
Problem Description
Python descriptor don't seem to be typed properly.
Steps to reproduce the behavior:
class MyDescriptor:
def __get__(self, obj, objtype = None) -> bool:
return False
class Test:
@property
def hello(self) -> int:
"""hello world"""
return 10
foo = MyDescriptor()
"""foo bar"""
The @property
is properly generated in the doc as hello: int
. My understanding is that @property
are basically Python descriptors.
My custom descriptor is generated as def foo(unknown):
. I'm not sure how other tools handle this use case, I'd have to check. I would be expecting def foo(self) -> bool:
or foo: bool
.

System Information
pdoc: 14.7.0
Python: 3.10.4
Platform: Windows-10-10.0.22631-SP0