Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
seda
Commits
4387b9357090
Commit
577e6ad6
authored
Dec 14, 2016
by
Sylvain Thénault
Browse files
Avoid warning about __init__ taking no arguments
parent
6d5d73b78dbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
site_cubicweb.py
View file @
4387b935
...
...
@@ -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
=
{}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment