Skip to content
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

Decide how to handle cached properties #139

Open
exonian opened this issue Jan 2, 2019 · 1 comment
Open

Decide how to handle cached properties #139

exonian opened this issue Jan 2, 2019 · 1 comment

Comments

@exonian
Copy link
Contributor

exonian commented Jan 2, 2019

#135 and #138 provide support for decorated functions, and these mostly work consistently (the function is treated the same as a regular method, and any decorators are shown in its source code).

However, I noticed that there's a case that's worked out differently. I wrote the support on the static site version of the project first, and one example I tested was a function using @cached_property. On that version, the function got treated as a method:
uses_datetime_field

Whereas in the regular version it now gets included, but gets treated as a property:
cached_property

I'm not sure which I think is right. Thoughts?

@ghickman
Copy link
Contributor

ghickman commented Jan 2, 2019

I'd vote for the former version since it's explicit.

The latter telling me it's a cached_property is good but I think showing the contents of that property is better.

Should we have a Properties section that expands all properties like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants