Commit 577e6ad6 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

Avoid warning about __init__ taking no arguments

parent 6d5d73b78dbb
......@@ -34,8 +34,8 @@ def __new__(cls, *args, **kwargs):
"""Add a __module__ attribute telling the module where the instance was
created, for automatic registration.
"""
self = super(registry.RegistrableInstance, cls).__new__(cls)
module = kwargs.pop('__module__', None)
self = super(registry.RegistrableInstance, cls).__new__(cls)
if module is None:
filepath = traceback.extract_stack(limit=2)[0][0]
module = registry._modname_from_path(filepath)
......@@ -44,8 +44,8 @@ def __new__(cls, *args, **kwargs):
@monkeypatch(rtags.RelationTags)
def __init__(self, **kwargs):
super(rtags.RelationTags, self).__init__(**kwargs)
def __init__(self, __module__=None):
super(rtags.RelationTags, self).__init__()
self._tagdefs = {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment