mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
fix: support python2 super()
This commit is contained in:
parent
cf69a06ab8
commit
7dd53b1396
@ -10,7 +10,7 @@ import six
|
|||||||
from telebot import util
|
from telebot import util
|
||||||
|
|
||||||
|
|
||||||
class JsonSerializable:
|
class JsonSerializable(object):
|
||||||
"""
|
"""
|
||||||
Subclasses of this class are guaranteed to be able to be converted to JSON format.
|
Subclasses of this class are guaranteed to be able to be converted to JSON format.
|
||||||
All subclasses of this class must override to_json.
|
All subclasses of this class must override to_json.
|
||||||
@ -26,7 +26,7 @@ class JsonSerializable:
|
|||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
class Dictionaryable:
|
class Dictionaryable(object):
|
||||||
"""
|
"""
|
||||||
Subclasses of this class are guaranteed to be able to be converted to dictionary.
|
Subclasses of this class are guaranteed to be able to be converted to dictionary.
|
||||||
All subclasses of this class must override to_dic.
|
All subclasses of this class must override to_dic.
|
||||||
@ -42,7 +42,7 @@ class Dictionaryable:
|
|||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
|
||||||
class JsonDeserializable:
|
class JsonDeserializable(object):
|
||||||
"""
|
"""
|
||||||
Subclasses of this class are guaranteed to be able to be created from a json-style dict or json formatted string.
|
Subclasses of this class are guaranteed to be able to be created from a json-style dict or json formatted string.
|
||||||
All subclasses of this class must override de_json.
|
All subclasses of this class must override de_json.
|
||||||
|
Loading…
Reference in New Issue
Block a user