Skip to content

Commit

Permalink
Merge pull request #39 from AntoineD/fix-shared-metaclass
Browse files Browse the repository at this point in the history
Copy the base metaclass for each new metaclass
  • Loading branch information
rsokl authored Jul 22, 2021
2 parents 9c9aa86 + b428650 commit 8bdab4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/custom_inherit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def DocInheritMeta(style="parent", abstract_base_class=False, include_special_me
custom_inherit.DocInheritorBase"""

merge_func = store[style]
metaclass = _DocInheritorBase
metaclass = type(_DocInheritorBase.__name__, _DocInheritorBase.__bases__, dict(_DocInheritorBase.__dict__))
metaclass.include_special_methods = include_special_methods
metaclass.class_doc_inherit = staticmethod(merge_func)
metaclass.attr_doc_inherit = staticmethod(merge_func)
Expand Down

0 comments on commit 8bdab4c

Please sign in to comment.