Skip to content

super(..) -> super() #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions rules_light/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ class RulesLightException(Exception):

class Denied(RulesLightException):
def __init__(self, rule_text):
super(Denied, self).__init__(u'%s evaluates to False' % rule_text)
super().__init__(u'%s evaluates to False' % rule_text)


class DoesNotExist(RulesLightException):
def __init__(self, name):
super(DoesNotExist, self).__init__(
super().__init__(
u'Rule "%s" is not registered' % name)
2 changes: 1 addition & 1 deletion rules_light/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def process_exception(self, request, exception):
'rules_light/exception.html', ctx))

def __init__(self, get_response=None):
super(Middleware, self).__init__()
super().__init__()
# Support Django 1.10 middleware.
if get_response is not None:
self.get_response = get_response
Expand Down
2 changes: 1 addition & 1 deletion rules_light/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __setitem__(self, key, value):
"""
Adds a debug-level log on registration.
"""
super(RuleRegistry, self).__setitem__(key, value)
super().__setitem__(key, value)
self.logger.debug(u'[rules_light] "%s" registered with: %s' % (
key, self.rule_text_name(value)))

Expand Down