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:
61
61
show_symbol_type_toc : true
62
62
show_symbol_type_heading : true
63
63
extensions :
64
- - scripts/griffe_exts.py:DynamicDocstrings
64
+ - scripts/griffe_exts.py:DynamicDocstrings :
65
+ ignore_paths :
66
+ - pyslurm.constants.UNLIMITED
65
67
66
68
markdown_extensions :
67
69
- admonition
Original file line number Diff line number Diff line change @@ -66,8 +66,11 @@ def replace_with_slurm_docs_url(match):
66
66
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
67
67
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
68
68
class 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
71
74
72
75
def on_instance (
73
76
self ,
@@ -76,7 +79,9 @@ def on_instance(
76
79
agent : griffe .Visitor | griffe .Inspector ,
77
80
** kwargs ,
78
81
) -> 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 )):
80
85
return
81
86
82
87
try :
You can’t perform that action at this time.
0 commit comments