zulip: Amend default value of remove_subscriptions:principals to None.
Having a default parameter as '[]' may not be an issue with the current implementation, but general practice is to default to None and assign a default list subsequently.
This commit is contained in:
parent
7e360c244c
commit
83b41a2e9e
|
@ -816,11 +816,14 @@ class Client(object):
|
||||||
request=request,
|
request=request,
|
||||||
)
|
)
|
||||||
|
|
||||||
def remove_subscriptions(self, streams, principals=[]):
|
def remove_subscriptions(self, streams, principals=None):
|
||||||
# type: (Iterable[str], Optional[Iterable[str]]) -> Dict[str, Any]
|
# type: (Iterable[str], Optional[Iterable[str]]) -> 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