From 47d311b10163fc1432071f7fda7cb1b2de880ccc Mon Sep 17 00:00:00 2001 From: Unrud Date: Fri, 9 Jun 2017 02:29:51 +0200 Subject: [PATCH] Improve doc strings --- radicale/storage.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/radicale/storage.py b/radicale/storage.py index 73536f68..83027be8 100644 --- a/radicale/storage.py +++ b/radicale/storage.py @@ -479,12 +479,22 @@ class BaseCollection: """ raise NotImplementedError - def get_meta(self, key): - """Get metadata value for collection.""" + def get_meta(self, key=None): + """Get metadata value for collection. + + Return the value of the property ``key``. If ``key`` is ``None`` return + a dict with all properties + + """ raise NotImplementedError def set_meta(self, props): - """Set metadata values for collection.""" + """Set metadata values for collection. + + ``props`` a dict with updates for properties. If a value is empty, the + property must be deleted. + + """ raise NotImplementedError @property @@ -961,8 +971,9 @@ class Collection(BaseCollection): return item def _get_with_metadata(self, href, verify_href=True): - # Like ``get`` but additonally returns the following metadata: - # tag, start, end: see ``xmlutils.find_tag_and_time_range`` + """Like ``get`` but additonally returns the following metadata: + tag, start, end: see ``xmlutils.find_tag_and_time_range``. If + extraction of the metadata failed, the values are all ``None``.""" if verify_href: try: if not is_safe_filesystem_path_component(href):