mirror of
https://github.com/Kozea/Radicale.git
synced 2025-08-22 19:20:54 +00:00
Adapt function template discovery to the implementation
This commit is contained in:
parent
040a433696
commit
d1ceb620e4
3 changed files with 13 additions and 8 deletions
|
@ -24,6 +24,7 @@ Take a look at the class ``BaseCollection`` if you want to implement your own.
|
|||
"""
|
||||
|
||||
import json
|
||||
from typing import Callable, ContextManager, Iterator, Optional, Set, cast
|
||||
import xml.etree.ElementTree as ET
|
||||
from hashlib import sha256
|
||||
from typing import (Iterable, Iterator, Mapping, Optional, Sequence, Set,
|
||||
|
@ -282,8 +283,11 @@ class BaseStorage:
|
|||
"""
|
||||
self.configuration = configuration
|
||||
|
||||
def discover(self, path: str, depth: str = "0") -> Iterable[
|
||||
"types.CollectionOrItem"]:
|
||||
def discover(
|
||||
self, path: str, depth: str = "0",
|
||||
child_context_manager: Optional[
|
||||
Callable[[str, Optional[str]], ContextManager[None]]] = None,
|
||||
user_groups: Set[str] = set([])) -> Iterable["types.CollectionOrItem"]:
|
||||
"""Discover a list of collections under the given ``path``.
|
||||
|
||||
``path`` is sanitized.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue