mkdocstrings / python

A Python handler for mkdocstrings.
https://mkdocstrings.github.io/python
ISC License
190 stars 35 forks source link

feature: Allow filtering objects in templates thanks to labels #164

Open pawamoy opened 6 months ago

pawamoy commented 6 months ago

Is your feature request related to a problem? Please describe.

I'm working on a custom template for another project and I find myself in need to filter functions of a class based on their labels. Since I can't, and since I have to iterate twice on the functions, I have to use a condition on the labels twice.

Describe the solution you'd like

Probably add a parameter to filter_objects to accept labels. They should all be present, just like Griffe's Object.has_labels.

Describe alternatives you've considered

Checking labels in conditions.

Additional context

https://github.com/qtile/qtile/pull/4612

Boost priority

Fund with Polar