api: Update type annotation in 'remove_subscriptions'.
This updates the type annotation for the 'principals' argument to accept a list of email addresses as well as user ids.
This commit is contained in:
parent
9745ec9ceb
commit
36071821c3
|
@ -15,7 +15,7 @@ import distro
|
||||||
from configparser import SafeConfigParser
|
from configparser import SafeConfigParser
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, Callable, Dict, Iterable, IO, List, Mapping, Optional, Text, Tuple, Union
|
from typing import Any, Callable, Dict, Iterable, IO, List, Mapping, Optional, Text, Tuple, Union, Sequence
|
||||||
|
|
||||||
__version__ = "0.7.0"
|
__version__ = "0.7.0"
|
||||||
|
|
||||||
|
@ -1302,13 +1302,11 @@ class Client:
|
||||||
request=request,
|
request=request,
|
||||||
)
|
)
|
||||||
|
|
||||||
def remove_subscriptions(self, streams: Iterable[str], principals: Optional[Iterable[str]] = None) -> Dict[str, Any]:
|
def remove_subscriptions(self, streams: Iterable[str],
|
||||||
|
principals: Union[Sequence[str], Sequence[int]] = []) -> Dict[str, Any]:
|
||||||
'''
|
'''
|
||||||
See examples/unsubscribe for example usage.
|
See examples/unsubscribe for example usage.
|
||||||
'''
|
'''
|
||||||
if principals is None:
|
|
||||||
principals = []
|
|
||||||
|
|
||||||
request = dict(
|
request = dict(
|
||||||
subscriptions=streams,
|
subscriptions=streams,
|
||||||
principals=principals
|
principals=principals
|
||||||
|
|
Loading…
Reference in a new issue