mixins: flush method dictionaries after registration.

This commit is contained in:
alalazo 2017-06-19 15:38:37 +02:00 committed by Todd Gamblin
parent 22def01adf
commit eae7263838

View file

@ -118,6 +118,9 @@ def __init__(cls, name, bases, attr_dict):
for f in fn_list:
phase_obj.run_before.append(f)
# Flush the dictionary for the next class
PackageMixinsMeta._add_method_before.clear()
for phase in PackageMixinsMeta._add_method_after:
attr_name = attr_fmt.format(phase)
@ -127,6 +130,9 @@ def __init__(cls, name, bases, attr_dict):
for f in fn_list:
phase_obj.run_after.append(f)
# Flush the dictionary for the next class
PackageMixinsMeta._add_method_after.clear()
super(PackageMixinsMeta, cls).__init__(name, bases, attr_dict)