Improve doc strings
This commit is contained in:
parent
12f9ac44c2
commit
47d311b101
@ -479,12 +479,22 @@ class BaseCollection:
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def get_meta(self, key):
|
def get_meta(self, key=None):
|
||||||
"""Get metadata value for collection."""
|
"""Get metadata value for collection.
|
||||||
|
|
||||||
|
Return the value of the property ``key``. If ``key`` is ``None`` return
|
||||||
|
a dict with all properties
|
||||||
|
|
||||||
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def set_meta(self, props):
|
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
|
raise NotImplementedError
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -961,8 +971,9 @@ class Collection(BaseCollection):
|
|||||||
return item
|
return item
|
||||||
|
|
||||||
def _get_with_metadata(self, href, verify_href=True):
|
def _get_with_metadata(self, href, verify_href=True):
|
||||||
# Like ``get`` but additonally returns the following metadata:
|
"""Like ``get`` but additonally returns the following metadata:
|
||||||
# tag, start, end: see ``xmlutils.find_tag_and_time_range``
|
tag, start, end: see ``xmlutils.find_tag_and_time_range``. If
|
||||||
|
extraction of the metadata failed, the values are all ``None``."""
|
||||||
if verify_href:
|
if verify_href:
|
||||||
try:
|
try:
|
||||||
if not is_safe_filesystem_path_component(href):
|
if not is_safe_filesystem_path_component(href):
|
||||||
|
Loading…
Reference in New Issue
Block a user