mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-01-03 09:49:21 +01:00
PEP8
This commit is contained in:
parent
0214910741
commit
bfe5b79ad9
4 changed files with 48 additions and 46 deletions
|
@ -2,16 +2,15 @@
|
|||
|
||||
|
||||
class Audio(object):
|
||||
def __init__(self, **kwargs):
|
||||
param_defaults = {
|
||||
'file_id': None,
|
||||
'duration': None,
|
||||
'mime_type': None,
|
||||
'file_size': None
|
||||
}
|
||||
|
||||
for (param, default) in param_defaults.iteritems():
|
||||
setattr(self, param, kwargs.get(param, default))
|
||||
def __init__(self,
|
||||
file_id,
|
||||
duration,
|
||||
mime_type=None,
|
||||
file_size=None):
|
||||
self.file_id = file_id
|
||||
self.duration = duration
|
||||
self.mime_type = mime_type
|
||||
self.file_size = file_size
|
||||
|
||||
@staticmethod
|
||||
def de_json(data):
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
|
||||
|
||||
class Document(object):
|
||||
def __init__(self, **kwargs):
|
||||
param_defaults = {
|
||||
'file_id': None,
|
||||
'thumb': None,
|
||||
'file_name': None,
|
||||
'mime_type': None,
|
||||
'file_size': None
|
||||
}
|
||||
|
||||
for (param, default) in param_defaults.iteritems():
|
||||
setattr(self, param, kwargs.get(param, default))
|
||||
def __init__(self,
|
||||
file_id,
|
||||
thumb,
|
||||
file_name=None,
|
||||
mime_type=None,
|
||||
file_size=None):
|
||||
self.file_id = file_id
|
||||
self.thumb = thumb
|
||||
self.file_name = file_name
|
||||
self.mime_type = mime_type
|
||||
self.file_size = file_size
|
||||
|
||||
@staticmethod
|
||||
def de_json(data):
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
|
||||
|
||||
class Sticker(object):
|
||||
def __init__(self, **kwargs):
|
||||
param_defaults = {
|
||||
'file_id': None,
|
||||
'width': None,
|
||||
'height': None,
|
||||
'thumb': None,
|
||||
'file_size': None
|
||||
}
|
||||
|
||||
for (param, default) in param_defaults.iteritems():
|
||||
setattr(self, param, kwargs.get(param, default))
|
||||
def __init__(self,
|
||||
file_id,
|
||||
width,
|
||||
height,
|
||||
thumb,
|
||||
file_size=None):
|
||||
self.file_id = file_id
|
||||
self.width = width
|
||||
self.height = height
|
||||
self.thumb = thumb
|
||||
self.file_size = file_size
|
||||
|
||||
@staticmethod
|
||||
def de_json(data):
|
||||
|
|
|
@ -2,20 +2,23 @@
|
|||
|
||||
|
||||
class Video(object):
|
||||
def __init__(self, **kwargs):
|
||||
param_defaults = {
|
||||
'file_id': None,
|
||||
'width': None,
|
||||
'height': None,
|
||||
'duration': None,
|
||||
'thumb': None,
|
||||
'mime_type': None,
|
||||
'file_size': None,
|
||||
'caption': None
|
||||
}
|
||||
|
||||
for (param, default) in param_defaults.iteritems():
|
||||
setattr(self, param, kwargs.get(param, default))
|
||||
def __init__(self,
|
||||
file_id,
|
||||
width,
|
||||
height,
|
||||
duration,
|
||||
thumb,
|
||||
mime_type=None,
|
||||
file_size=None,
|
||||
caption=None):
|
||||
self.file_id = file_id
|
||||
self.width = width
|
||||
self.height = height
|
||||
self.duration = duration
|
||||
self.thumb = thumb
|
||||
self.mime_type = mime_type
|
||||
self.file_size = file_size
|
||||
self.caption = caption
|
||||
|
||||
@staticmethod
|
||||
def de_json(data):
|
||||
|
|
Loading…
Reference in a new issue