Easier way to exclude members from builtin sections
Closed this issue · 1 comments
kalekundert commented
Section
classes should the ability to easily exclude members that would be matched by another section. A good way to do this might be to add a class member called exclude
(or something to that effect) which could be a list of Section
classes (not instances). Any members that match any of the excluded sections will not be included in the section in question. For example:
class MyCustomMethods(Section):
def predicate(self, name, attr, meta):
return ...
class MyPublicMethods(PublicMethods):
exclude = [MyCustomMethods]
funkyfuture commented
that looks reasonable as design. but exclude
is too broad as a name. i'd come up with no_duplicates_from_sections
, but a native english speaker certainly does better.