ccbv icon indicating copy to clipboard operation
ccbv copied to clipboard

Decide how to handle cached properties

Open exonian opened this issue 7 years ago • 2 comments

#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?

exonian avatar Jan 02 '19 11:01 exonian

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?

ghickman avatar Jan 02 '19 12:01 ghickman