@@ -388,13 +388,31 @@ def check_starts_with_this(self, function, docstring):
388
388
389
389
390
390
def check (filenames , select = None , ignore = None ):
391
- """Generate PEP 257 errors that exist in `filenames` iterable.
391
+ """Generate docstring errors that exist in `filenames` iterable.
392
392
393
- Only returns errors with error-codes defined in `checked_codes` iterable.
393
+ By default, the PEP-257 convention is checked. To specifically define the
394
+ set of error codes to check for, supply either `select` or `ignore` (but
395
+ not both). In either case, the parameter should be a collection of error
396
+ code strings, e.g., {'D100', 'D404'}.
394
397
395
- Example
396
- -------
397
- >>> check(['pydocstyle.py'], checked_codes=['D100'])
398
+ When supplying `select`, only specified error codes will be reported.
399
+ When supplying `ignore`, all error codes which were not specified will be
400
+ reported.
401
+
402
+ Note that ignored error code refer to the entire set of possible
403
+ error codes, which is larger than just the PEP-257 convention. To your
404
+ convenience, you may use `pydocstyle.violations.conventions.pep257` as
405
+ a base set to add or remove errors from.
406
+
407
+ Examples
408
+ ---------
409
+ >>> check(['pydocstyle.py'])
410
+ <generator object check at 0x...>
411
+
412
+ >>> check(['pydocstyle.py'], select=['D100'])
413
+ <generator object check at 0x...>
414
+
415
+ >>> check(['pydocstyle.py'], ignore=conventions.pep257 - {'D100'})
398
416
<generator object check at 0x...>
399
417
400
418
"""
0 commit comments