Document properties of BaseCollection

This commit is contained in:
Unrud 2017-06-09 02:31:03 +02:00 committed by Unrud
parent 79e7232ecb
commit e09d33f3ee

View File

@ -322,6 +322,15 @@ class BaseCollection:
configuration = None configuration = None
logger = None logger = None
# Properties of instance
"""The sanitized path of the collection without leading or trailing ``/``.
"""
path = ""
"""The owner of the collection. (``path.split("/", maxsplit=1)[0]``)"""
owner = ""
"""Collection is a principal. (``bool(path) and "/" not in path``)"""
is_principal = False
@classmethod @classmethod
def discover(cls, path, depth="0"): def discover(cls, path, depth="0"):
"""Discover a list of collections under the given ``path``. """Discover a list of collections under the given ``path``.