reduce memory usage
This commit is contained in:
@ -251,7 +251,7 @@ class Property(object):
|
||||
:type propname: string
|
||||
"""
|
||||
if self._opt is not None and self._opt.impl_getrequires() is not None \
|
||||
and propname in self._opt._calc_properties: # pragma: optional cover
|
||||
and propname in self._opt.impl_get_calc_properties(): # pragma: optional cover
|
||||
raise ValueError(_('cannot append {0} property for option {1}: '
|
||||
'this property is calculated').format(
|
||||
propname, self._opt.impl_getname()))
|
||||
@ -573,13 +573,13 @@ class Settings(object):
|
||||
:param path: the option's path in the config
|
||||
:type path: str
|
||||
"""
|
||||
if opt._requires is None:
|
||||
if opt.impl_getrequires() == []:
|
||||
return frozenset()
|
||||
|
||||
# filters the callbacks
|
||||
calc_properties = set()
|
||||
context = self._getcontext()
|
||||
for requires in opt._requires:
|
||||
for requires in opt.impl_getrequires():
|
||||
for require in requires:
|
||||
option, expected, action, inverse, \
|
||||
transitive, same_action = require
|
||||
|
Reference in New Issue
Block a user