File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1764,8 +1764,8 @@ def get_value(self, dictionary):
1764
1764
# When HTML form input is used, mark up the input
1765
1765
# as being a JSON string, rather than a JSON primitive.
1766
1766
class JSONString (str ):
1767
- def __new__ (self , value ):
1768
- ret = str .__new__ (self , value )
1767
+ def __new__ (cls , value ):
1768
+ ret = str .__new__ (cls , value )
1769
1769
ret .is_json_string = True
1770
1770
return ret
1771
1771
return JSONString (dictionary [self .field_name ])
Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ class Hyperlink(str):
46
46
We use this for hyperlinked URLs that may render as a named link
47
47
in some contexts, or render as a plain URL in others.
48
48
"""
49
- def __new__ (self , url , obj ):
50
- ret = str .__new__ (self , url )
49
+ def __new__ (cls , url , obj ):
50
+ ret = str .__new__ (cls , url )
51
51
ret .obj = obj
52
52
return ret
53
53
You can’t perform that action at this time.
0 commit comments