Describe the bug
Methods and functions that are decorated with @overload but do not have an implementation (as is standard in a stub file) are not detected:
To Reproduce
# mystub.pyifromtypingimportoverloadclassM:
@overloaddeff(self, x: int) ->int: ...
@overloaddeff(self, x: str) ->str: ...
classM2:
@overloaddeff(self, x: int) ->int: ...
@overloaddeff(self, x: str) ->str: ...
deff(self, x: str|int) ->str|int: ... # one wouldn't normally do this in a stub
In [3]: griffe.load('mystub._test.M').membersOut[3]: {}
In [4]: griffe.load('mystub._test.M2').membersOut[4]: {'f': <Function('f', 14, 14)>}Expected behavior
Expected f method to be detected.
System (please complete the following information):
griffe version: 0.24.1- Python version: 3.10
- OS: mac
Will probably be relevant for mkdocstrings/mkdocstrings#308 as well
Describe the bug
Methods and functions that are decorated with
@overloadbut do not have an implementation (as is standard in a stub file) are not detected:To Reproduce
Expected behavior
Expected
fmethod to be detected.System (please complete the following information):
griffeversion: 0.24.1Will probably be relevant for mkdocstrings/mkdocstrings#308 as well