Skip to content

Commit 2028a74

Browse files
committed
make supers more standard (NO_JIRA)
1 parent 0aaed47 commit 2028a74

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

scripts/refcodes_with_properties/entry_property_calculator.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def argument_pair():
5959
class _ComparativeFilter(_Filter):
6060
def __init__(self, args):
6161
value = False
62-
if eval(args.strip()) == 1:
62+
if args.strip() == '1' or args.strip().lower() == 'true':
6363
value = True
6464

6565
self.expected_value = value
@@ -143,7 +143,7 @@ def __call__(self, entry):
143143

144144
class OrganicFilter(_ComparativeFilter):
145145
def __init__(self, args):
146-
super(self.__class__, self).__init__(args)
146+
super().__init__(args)
147147

148148
@staticmethod
149149
def name():
@@ -162,7 +162,7 @@ def value(self, entry):
162162

163163
class PolymericFilter(_ComparativeFilter):
164164
def __init__(self, args):
165-
super(self.__class__, self).__init__(args)
165+
super().__init__(args)
166166

167167
@staticmethod
168168
def name():
@@ -181,7 +181,7 @@ def value(self, entry):
181181

182182
class AllHaveSitesFilter(_ComparativeFilter):
183183
def __init__(self, args):
184-
super(self.__class__, self).__init__(args)
184+
super().__init__(args)
185185

186186
@staticmethod
187187
def name():
@@ -203,7 +203,7 @@ def value(self, entry):
203203

204204
class DisorderedFilter(_ComparativeFilter):
205205
def __init__(self, args):
206-
super(self.__class__, self).__init__(args)
206+
super().__init__(args)
207207

208208
@staticmethod
209209
def name():
@@ -222,7 +222,7 @@ def value(self, entry):
222222

223223
class AtomicWeightFilter(_RangeFilter):
224224
def __init__(self, args):
225-
super(self.__class__, self).__init__(args)
225+
super().__init__(args)
226226

227227
@staticmethod
228228
def name():
@@ -245,7 +245,7 @@ def value(self, entry):
245245

246246
class AtomCountFilter(_RangeFilter):
247247
def __init__(self, args):
248-
super(self.__class__, self).__init__(args)
248+
super().__init__(args)
249249

250250
@staticmethod
251251
def name():
@@ -268,7 +268,7 @@ def value(self, entry):
268268

269269
class RotatableBondFilter(_RangeFilter):
270270
def __init__(self, args):
271-
super(self.__class__, self).__init__(args)
271+
super().__init__(args)
272272

273273
@staticmethod
274274
def name():
@@ -291,7 +291,7 @@ def value(self, entry):
291291

292292
class DonorCountFilter(_RangeFilter):
293293
def __init__(self, args):
294-
super(self.__class__, self).__init__(args)
294+
super().__init__(args)
295295

296296
@staticmethod
297297
def name():
@@ -314,7 +314,7 @@ def value(self, entry):
314314

315315
class AcceptorCountFilter(_RangeFilter):
316316
def __init__(self, args):
317-
super(self.__class__, self).__init__(args)
317+
super().__init__(args)
318318

319319
@staticmethod
320320
def name():
@@ -337,7 +337,7 @@ def value(self, entry):
337337

338338
class ComponentCountFilter(_RangeFilter):
339339
def __init__(self, args):
340-
super(self.__class__, self).__init__(args)
340+
super().__init__(args)
341341

342342
@staticmethod
343343
def name():
@@ -359,7 +359,7 @@ def value(self, entry):
359359

360360
class ZPrimeFilter(_RangeFilter):
361361
def __init__(self, args):
362-
super(self.__class__, self).__init__(args)
362+
super().__init__(args)
363363

364364
@staticmethod
365365
def name():
@@ -378,7 +378,7 @@ def value(self, entry):
378378

379379
class RfactorFilter(_RangeFilter):
380380
def __init__(self, args):
381-
super(self.__class__, self).__init__(args)
381+
super().__init__(args)
382382

383383
@staticmethod
384384
def name():
@@ -397,7 +397,7 @@ def value(self, entry):
397397

398398
class SpacegroupNumberFilter(_RangeFilter):
399399
def __init__(self, args):
400-
super(self.__class__, self).__init__(args)
400+
super().__init__(args)
401401

402402
@staticmethod
403403
def name():

0 commit comments

Comments
 (0)