Skip to content

Commit b428650

Browse files
committed
Copy the base metaclass for each new metaclass
1 parent 9c9aa86 commit b428650

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)