This appears related to #116 (but is different as there is no concrete implementation here)
Description of the bug
When using stubs only, overloads do not get detected.
To Reproduce
# my_stub/__init__.py
from typing import overload
@overload
def foo(a: int) -> int: ...
@overload
def foo(a: str) -> str: ...
@overload
def bar(a: int) -> int: ...
@overload
def bar(a: str) -> str: ...
# This shoudn't be in the stub file, but without it Griffe does not detect the function.
def bar(a: int | str) -> int | str: ...
>>> griffe.load('my_stub').members
{'overload': Alias('overload', 'typing.overload'), 'bar': Function('bar', 18, 18)}
bar is detected but not foo in the stub.
Expected behavior
Expect foo in the above stub to be detected.
Environment information
griffe==1.14.0
Note
Using a stub-only package for doc generation using mkdocstrings to avoid pulling all dependencies of the full package.
This appears related to #116 (but is different as there is no concrete implementation here)
Description of the bug
When using stubs only, overloads do not get detected.
To Reproduce
baris detected but notfooin the stub.Expected behavior
Expect
fooin the above stub to be detected.Environment information
griffe==1.14.0Note
Using a stub-only package for doc generation using
mkdocstringsto avoid pulling all dependencies of the full package.