-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sphinx documentation with methodtools.lru_cache
#1
Comments
Thanks for reporting missing feature.
|
I released 0.1.2 with this document fix: https://pypi.org/project/methodtools/0.1.2/ |
This did not seem to fix the problem for me. |
I wanted to test this problem with actual example of sphinx but didn't have enough time to do that. |
Dear @youknowone , Do we need to create a new decorator to show the docstring? |
Dear @youknowone , from methodtools import lru_cache
def show_info(func):
def wrapper(*args, **kwargs):
return func.cache_info(*args, **kwargs)
return wrapper
class ClassA(object):
@show_info
@lru_cache(maxsize=None)
def method_a(self, arg1):
"""
This may be a method to do something.
"""
pass In sphinx document, |
I don't think you need |
Dear @youknowone , |
It seems sphinx only support actual functions |
Thank you for your help. |
When I decorate a method with
methodtools.lru_cache
and then build sphinx documentation, the docstring shows as<methodtools._LruCacheWire object>
rather than the documentation for the method in its docstring.I think this type of problem is addressed here, but I can't figure out how to modify
methodtools
to fix the problem.The text was updated successfully, but these errors were encountered: