@@ -52,6 +52,14 @@ def f(
52
52
hh: str = \" str, str, str, str\" ,
53
53
ii: tuple[int, ...] = (4, 6),
54
54
jj: str = \" str,str\" ,
55
+ )" )
56
+ (fsig-ignored-args " \
57
+ def func_with_ignored_args(
58
+ self,
59
+ a1: int,
60
+ a2: str,
61
+ *args,
62
+ **kwargs,
55
63
)" ))
56
64
(it " Checks arg parsing 1"
57
65
(let ((a (make-numpydoc--arg :name " a" :type " int" :defval nil ))
@@ -136,7 +144,31 @@ def f(
136
144
(expect gg :to-equal (nth 6 args))
137
145
(expect hh :to-equal (nth 7 args))
138
146
(expect ii :to-equal (nth 8 args))
139
- (expect jj :to-equal (nth 9 args)))))
147
+ (expect jj :to-equal (nth 9 args))))
148
+ (it " Checks arg parsing for ignored param names"
149
+ (let* ((numpydoc-ignored-params (list " self" " *args" " **kwargs" ))
150
+ (self (make-numpydoc--arg :name " self"
151
+ :type nil
152
+ :defval nil ))
153
+ (a1 (make-numpydoc--arg :name " a1"
154
+ :type " int"
155
+ :defval nil ))
156
+ (a2 (make-numpydoc--arg :name " a2"
157
+ :type " str"
158
+ :defval nil ))
159
+ (pyargs (make-numpydoc--arg :name " *args"
160
+ :type nil
161
+ :defval nil ))
162
+ (kwargs (make-numpydoc--arg :name " **kwargs"
163
+ :type nil
164
+ :defval nil ))
165
+
166
+ (args (numpydoc--def-args (numpydoc--parse-def fsig-ignored-args))))
167
+ (expect a1 :to-equal (car args))
168
+ (expect a2 :to-equal (nth 1 args))
169
+ (expect args :not :to-contain self)
170
+ (expect args :not :to-contain pyargs)
171
+ (expect args :not :to-contain kwargs))))
140
172
141
173
(provide 'test-numpydoc )
142
174
; ;; test-numpydoc.el ends here
0 commit comments