@@ -36,7 +36,7 @@ def __getattr__(self, name):
36
36
37
37
def __getitem__ (self , key ):
38
38
try :
39
- return super ().__getitem__ (key )
39
+ return super (CustomDict , self ).__getitem__ (key )
40
40
except KeyError :
41
41
raise VariableError
42
42
@@ -48,7 +48,7 @@ def __init__(self, key, type, **args):
48
48
#required_or = [set(csl.VARIABLES)]
49
49
optional = ({'uri' , 'container_uri' , 'contributor' , 'date' } |
50
50
set (VARIABLES ))
51
- super ().__init__ (args , optional = optional )
51
+ super (Reference , self ).__init__ (args , optional = optional )
52
52
53
53
def __repr__ (self ):
54
54
return '{}({})' .format (self .__class__ .__name__ , self .key )
@@ -67,7 +67,7 @@ def __init__(self, **args):
67
67
required = {'family' }
68
68
optional = {'given' , 'dropping-particle' , 'non-dropping-particle' ,
69
69
'suffix' }
70
- super ().__init__ (args , required , optional )
70
+ super (Name , self ).__init__ (args , required , optional )
71
71
72
72
def parts (self ):
73
73
return (self .get ('given' ), self .get ('family' ),
@@ -78,7 +78,7 @@ def parts(self):
78
78
class DateBase (CustomDict ):
79
79
def __init__ (self , args , required = set (), optional = set ()):
80
80
optional = {'circa' } | optional
81
- super ().__init__ (args , required , optional )
81
+ super (DateBase , self ).__init__ (args , required , optional )
82
82
# defaults
83
83
if 'circa' not in self :
84
84
self ['circa' ] = False
@@ -92,7 +92,7 @@ def __init__(self, **args):
92
92
raise TypeError ('When specifying the day, you should also specify '
93
93
'the month' )
94
94
args = {key : int (value ) for key , value in args .items ()}
95
- super ().__init__ (args , required , optional )
95
+ super (Date , self ).__init__ (args , required , optional )
96
96
97
97
def sort_key (self ):
98
98
year = self .year
@@ -108,7 +108,7 @@ def is_nil(self):
108
108
class LiteralDate (DateBase ):
109
109
def __init__ (self , text , ** args ):
110
110
self .text = text
111
- super ().__init__ (args )
111
+ super (LiteralDate , self ).__init__ (args )
112
112
113
113
def sort_key (self ):
114
114
return self .text
@@ -118,7 +118,7 @@ class DateRange(DateBase):
118
118
def __init__ (self , ** args ):
119
119
required = {'begin' }
120
120
optional = {'end' }
121
- super ().__init__ (args , required , optional )
121
+ super (DateRange , self ).__init__ (args , required , optional )
122
122
123
123
def sort_key (self ):
124
124
begin = self .begin .sort_key ()
@@ -139,15 +139,15 @@ def __init__(self, **args):
139
139
args [key ] = int (value )
140
140
except ValueError :
141
141
pass
142
- super ().__init__ (args , required , optional )
142
+ super (Pages , self ).__init__ (args , required , optional )
143
143
144
144
145
145
class Citation (CustomDict ):
146
146
def __init__ (self , cites , ** kwargs ):
147
147
for cite in cites :
148
148
cite .citation = self
149
149
self .cites = cites
150
- super ().__init__ (kwargs )
150
+ super (Citation , self ).__init__ (kwargs )
151
151
152
152
def __repr__ (self ):
153
153
cites = ', ' .join ([cite .key for cite in self .cites ])
@@ -158,7 +158,7 @@ class CitationItem(CustomDict):
158
158
def __init__ (self , key , bibliography = None , ** args ):
159
159
self .key = key .lower ()
160
160
optional = {'locator' , 'prefix' , 'suffix' }
161
- super ().__init__ (args , optional = optional )
161
+ super (CitationItem , self ).__init__ (args , optional = optional )
162
162
163
163
def __repr__ (self ):
164
164
return '{}({})' .format (self .__class__ .__name__ , self .key )
0 commit comments