fix python formatting

This commit is contained in:
Simon Laux
2020-02-09 12:36:37 +01:00
parent d73d021e3c
commit afc9ed2274

View File

@@ -5,7 +5,6 @@ import calendar
import json import json
from datetime import datetime from datetime import datetime
import os import os
import time
from .cutil import as_dc_charpointer, from_dc_charpointer, iter_array from .cutil import as_dc_charpointer, from_dc_charpointer, iter_array
from .capi import lib, ffi from .capi import lib, ffi
from . import const from . import const
@@ -97,12 +96,12 @@ class Chat(object):
""" """
name = as_dc_charpointer(name) name = as_dc_charpointer(name)
return lib.dc_set_chat_name(self._dc_context, self.id, name) return lib.dc_set_chat_name(self._dc_context, self.id, name)
def mute(self, duration=None): def mute(self, duration=None):
""" mutes the chat """ mutes the chat
:param duration: Number of seconds to mute the chat for. None to mute until unmuted again. :param duration: Number of seconds to mute the chat for. None to mute until unmuted again.
:returns: :returns:
""" """
if duration is None: if duration is None:
mute_duration = -1 mute_duration = -1
@@ -113,14 +112,14 @@ class Chat(object):
def unmute(self): def unmute(self):
""" unmutes the chat """ unmutes the chat
:returns: :returns:
""" """
return bool(lib.dc_set_chat_mute_duration(self._dc_context, self.id, 0)) return bool(lib.dc_set_chat_mute_duration(self._dc_context, self.id, 0))
def get_mute_duration(self): def get_mute_duration(self):
""" Returns the number of seconds until the mute of this chat is lifted. """ Returns the number of seconds until the mute of this chat is lifted.
:param duration: :param duration:
:returns: Returns the number of seconds the chat is still muted for. (0 for not muted, -1 forever muted) :returns: Returns the number of seconds the chat is still muted for. (0 for not muted, -1 forever muted)
""" """
return bool(lib.dc_chat_get_remaining_mute_duration(self.id)) return bool(lib.dc_chat_get_remaining_mute_duration(self.id))