Skip to content

Commit df31e58

Browse files
committed
Fix numpydoc enum skipping
1 parent 2b5a9e9 commit df31e58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dev/archery/archery/lang/python.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ def signature(obj):
216216
inspect.signature = orig_signature
217217

218218
def _should_ignore_error(self, obj, errcode):
219-
for typ, codes in NumpyDoc.IGNORE_VALIDATION_ERRORS_FOR_TYPE.items():
220-
if isinstance(obj, typ) and errcode in codes:
219+
for obj_type, errcode_list in self.IGNORE_VALIDATION_ERRORS_FOR_TYPE.items():
220+
if isinstance(obj, obj_type) and errcode in errcode_list:
221221
return True
222222
return False
223223

@@ -238,7 +238,7 @@ def callback(obj):
238238
continue
239239
if disallow_rules and errcode in disallow_rules:
240240
continue
241-
if self._should_ignore_error(type(obj), errcode):
241+
if self._should_ignore_error(obj, errcode):
242242
continue
243243
errors.append((errcode, errmsg))
244244

0 commit comments

Comments
 (0)