File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,9 @@ plugins:
6161 show_symbol_type_toc : true
6262 show_symbol_type_heading : true
6363 extensions :
64- - scripts/griffe_exts.py:DynamicDocstrings
64+ - scripts/griffe_exts.py:DynamicDocstrings :
65+ ignore_paths :
66+ - pyslurm.constants.UNLIMITED
6567
6668markdown_extensions :
6769 - admonition
Original file line number Diff line number Diff line change @@ -66,8 +66,11 @@ def replace_with_slurm_docs_url(match):
6666# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
6767# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
6868class DynamicDocstrings (griffe .Extension ):
69- def __init__ (self , object_paths : list [str ] | None = None ) -> None :
70- self .object_paths = object_paths
69+ def __init__ (self , include_paths : list [str ] | None = None ,
70+ ignore_paths : list [str ] | None = None ) -> None :
71+
72+ self .include_paths = include_paths
73+ self .ignore_paths = ignore_paths
7174
7275 def on_instance (
7376 self ,
@@ -76,7 +79,9 @@ def on_instance(
7679 agent : griffe .Visitor | griffe .Inspector ,
7780 ** kwargs ,
7881 ) -> None :
79- if self .object_paths and obj .path not in self .object_paths :
82+
83+ if ((self .include_paths and obj .path not in self .include_paths )
84+ or (self .ignore_paths and obj .path in self .ignore_paths )):
8085 return
8186
8287 try :
You can’t perform that action at this time.
0 commit comments