Skip to content

Commit 8bdab4c

Browse files
authored
Merge pull request #39 from AntoineD/fix-shared-metaclass
Copy the base metaclass for each new metaclass
2 parents 9c9aa86 + b428650 commit 8bdab4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/custom_inherit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def DocInheritMeta(style="parent", abstract_base_class=False, include_special_me
169169
custom_inherit.DocInheritorBase"""
170170

171171
merge_func = store[style]
172-
metaclass = _DocInheritorBase
172+
metaclass = type(_DocInheritorBase.__name__, _DocInheritorBase.__bases__, dict(_DocInheritorBase.__dict__))
173173
metaclass.include_special_methods = include_special_methods
174174
metaclass.class_doc_inherit = staticmethod(merge_func)
175175
metaclass.attr_doc_inherit = staticmethod(merge_func)

0 commit comments

Comments
 (0)