Skip to content
This repository has been archived by the owner on Nov 11, 2022. It is now read-only.

Commit

Permalink
Remove methods with unnecessary super delegation.
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsource-autofix[bot] authored and alissonlauffer committed Mar 9, 2021
1 parent 77aa3b4 commit bd67c0d
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 20 deletions.
12 changes: 0 additions & 12 deletions amanobot/exception.py
Expand Up @@ -3,8 +3,6 @@ class AmanobotException(Exception):
pass

class BadFlavor(AmanobotException):
def __init__(self, offender):
super(BadFlavor, self).__init__(offender)

@property
def offender(self):
Expand All @@ -22,9 +20,6 @@ class BadHTTPResponse(AmanobotException):
- a bad gateway, e.g. when Telegram servers are down.
"""

def __init__(self, status, text, response):
super(BadHTTPResponse, self).__init__(status, text, response)

@property
def status(self):
return self.args[0]
Expand All @@ -38,16 +33,12 @@ def response(self):
return self.args[2]

class EventNotFound(AmanobotException):
def __init__(self, event):
super(EventNotFound, self).__init__(event)

@property
def event(self):
return self.args[0]

class WaitTooLong(AmanobotException):
def __init__(self, seconds):
super(WaitTooLong, self).__init__(seconds)

@property
def seconds(self):
Expand All @@ -74,9 +65,6 @@ class TelegramError(AmanobotException):
an exception of that subclass is raised.
"""

def __init__(self, description, error_code, json):
super(TelegramError, self).__init__(description, error_code, json)

@property
def description(self):
return self.args[0]
Expand Down
2 changes: 0 additions & 2 deletions examples/inline/inline.py
Expand Up @@ -11,8 +11,6 @@
"""

class InlineHandler(amanobot.helper.InlineUserHandler, amanobot.helper.AnswererMixin):
def __init__(self, *args, **kwargs):
super(InlineHandler, self).__init__(*args, **kwargs)

def on_inline_query(self, msg):
def compute_answer():
Expand Down
2 changes: 0 additions & 2 deletions examples/inline/inlinea.py
Expand Up @@ -12,8 +12,6 @@
"""

class InlineHandler(InlineUserHandler, AnswererMixin):
def __init__(self, *args, **kwargs):
super(InlineHandler, self).__init__(*args, **kwargs)

def on_inline_query(self, msg):
def compute_answer():
Expand Down
2 changes: 0 additions & 2 deletions examples/payment/payment.py
Expand Up @@ -14,8 +14,6 @@
"""

class OrderProcessor(amanobot.helper.InvoiceHandler):
def __init__(self, *args, **kwargs):
super(OrderProcessor, self).__init__(*args, **kwargs)

@staticmethod
def on_shipping_query(msg):
Expand Down
2 changes: 0 additions & 2 deletions examples/payment/paymenta.py
Expand Up @@ -15,8 +15,6 @@
"""

class OrderProcessor(amanobot.aio.helper.InvoiceHandler):
def __init__(self, *args, **kwargs):
super(OrderProcessor, self).__init__(*args, **kwargs)

async def on_shipping_query(self, msg):
query_id, from_id, invoice_payload = amanobot.glance(msg, flavor='shipping_query')
Expand Down

0 comments on commit bd67c0d

Please sign in to comment.