-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
missing-yield/raises-doc
respect no-docstring-rgx
option
- Loading branch information
1 parent
a21af6a
commit 262723a
Showing
5 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
``missing-return-doc`` now respects the ``no-docstring-rgx`` option. | ||
``missing-return-doc``, ``missing-raises-doc`` and ``missing-yields-doc`` now respect | ||
the ``no-docstring-rgx`` option. | ||
|
||
Closes #4743 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
tests/functional/ext/docparams/yield/missing_yield_doc_required.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
"""Tests for missing-yield-doc and missing-yield-type-doc with accept-no-yields-doc = no""" | ||
# pylint: disable=missing-function-docstring, unused-argument, function-redefined | ||
|
||
from typing import Iterator | ||
|
||
|
||
# Test missing docstring | ||
def my_func(self): # [missing-yield-doc, missing-yield-type-doc] | ||
yield False | ||
|
||
|
||
# This function doesn't require a docstring, because its name starts | ||
# with an '_' (no-docstring-rgx): | ||
def _function(some_arg: int) -> Iterator[int]: | ||
yield some_arg |
4 changes: 2 additions & 2 deletions
4
tests/functional/ext/docparams/yield/missing_yield_doc_required.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
missing-yield-doc:6:0:6:11:my_func:Missing yield documentation:HIGH | ||
missing-yield-type-doc:6:0:6:11:my_func:Missing yield type documentation:HIGH | ||
missing-yield-doc:8:0:8:11:my_func:Missing yield documentation:HIGH | ||
missing-yield-type-doc:8:0:8:11:my_func:Missing yield type documentation:HIGH |