mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2025-03-26 16:38:53 +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):
|
class Audio(object):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self,
|
||||||
param_defaults = {
|
file_id,
|
||||||
'file_id': None,
|
duration,
|
||||||
'duration': None,
|
mime_type=None,
|
||||||
'mime_type': None,
|
file_size=None):
|
||||||
'file_size': None
|
self.file_id = file_id
|
||||||
}
|
self.duration = duration
|
||||||
|
self.mime_type = mime_type
|
||||||
for (param, default) in param_defaults.iteritems():
|
self.file_size = file_size
|
||||||
setattr(self, param, kwargs.get(param, default))
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def de_json(data):
|
def de_json(data):
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
|
|
||||||
|
|
||||||
class Document(object):
|
class Document(object):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self,
|
||||||
param_defaults = {
|
file_id,
|
||||||
'file_id': None,
|
thumb,
|
||||||
'thumb': None,
|
file_name=None,
|
||||||
'file_name': None,
|
mime_type=None,
|
||||||
'mime_type': None,
|
file_size=None):
|
||||||
'file_size': None
|
self.file_id = file_id
|
||||||
}
|
self.thumb = thumb
|
||||||
|
self.file_name = file_name
|
||||||
for (param, default) in param_defaults.iteritems():
|
self.mime_type = mime_type
|
||||||
setattr(self, param, kwargs.get(param, default))
|
self.file_size = file_size
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def de_json(data):
|
def de_json(data):
|
||||||
|
|
|
@ -2,17 +2,17 @@
|
||||||
|
|
||||||
|
|
||||||
class Sticker(object):
|
class Sticker(object):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self,
|
||||||
param_defaults = {
|
file_id,
|
||||||
'file_id': None,
|
width,
|
||||||
'width': None,
|
height,
|
||||||
'height': None,
|
thumb,
|
||||||
'thumb': None,
|
file_size=None):
|
||||||
'file_size': None
|
self.file_id = file_id
|
||||||
}
|
self.width = width
|
||||||
|
self.height = height
|
||||||
for (param, default) in param_defaults.iteritems():
|
self.thumb = thumb
|
||||||
setattr(self, param, kwargs.get(param, default))
|
self.file_size = file_size
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def de_json(data):
|
def de_json(data):
|
||||||
|
|
|
@ -2,20 +2,23 @@
|
||||||
|
|
||||||
|
|
||||||
class Video(object):
|
class Video(object):
|
||||||
def __init__(self, **kwargs):
|
def __init__(self,
|
||||||
param_defaults = {
|
file_id,
|
||||||
'file_id': None,
|
width,
|
||||||
'width': None,
|
height,
|
||||||
'height': None,
|
duration,
|
||||||
'duration': None,
|
thumb,
|
||||||
'thumb': None,
|
mime_type=None,
|
||||||
'mime_type': None,
|
file_size=None,
|
||||||
'file_size': None,
|
caption=None):
|
||||||
'caption': None
|
self.file_id = file_id
|
||||||
}
|
self.width = width
|
||||||
|
self.height = height
|
||||||
for (param, default) in param_defaults.iteritems():
|
self.duration = duration
|
||||||
setattr(self, param, kwargs.get(param, default))
|
self.thumb = thumb
|
||||||
|
self.mime_type = mime_type
|
||||||
|
self.file_size = file_size
|
||||||
|
self.caption = caption
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def de_json(data):
|
def de_json(data):
|
||||||
|
|
Loading…
Add table
Reference in a new issue