mixins: flush method dictionaries after registration.
This commit is contained in:
parent
22def01adf
commit
eae7263838
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue