mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-28 08:59:54 +03:00
refactor: use super to replace inherit class
This commit is contained in:
parent
c721f49c75
commit
0940d6f26f
|
@ -47,7 +47,7 @@ class Hyperlink(str):
|
|||
in some contexts, or render as a plain URL in others.
|
||||
"""
|
||||
def __new__(cls, url, obj):
|
||||
ret = str.__new__(cls, url)
|
||||
ret = super().__new__(cls, url)
|
||||
ret.obj = obj
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user