-
-
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.
Functional tests for docparams extension docstring-min-length fix
- Loading branch information
berker.sal
committed
Dec 6, 2024
1 parent
c750d7b
commit 1f425b3
Showing
6 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
tests/functional/ext/docparams/raise/missing_raises_doc_required_min_length.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"""Tests for missing-raises-doc for non-specified style docstrings | ||
with accept-no-raise-doc = no and docstring-min-length = 3 | ||
""" | ||
# pylint: disable=invalid-name | ||
|
||
# Example of a function that is less than 'docstring-min-length' config option | ||
# No error message is emitted. | ||
def test_skip_docstring_min_length(): | ||
"""function is too short and is missing raise documentation""" | ||
raise Exception |
7 changes: 7 additions & 0 deletions
7
tests/functional/ext/docparams/raise/missing_raises_doc_required_min_length.rc
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[MAIN] | ||
load-plugins = pylint.extensions.docparams | ||
|
||
[BASIC] | ||
accept-no-raise-doc=no | ||
docstring-min-length=3 | ||
no-docstring-rgx=^$ |
10 changes: 10 additions & 0 deletions
10
tests/functional/ext/docparams/return/missing_return_doc_required_min_length.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"""Tests for missing-return-doc for non-specified style docstrings | ||
with accept-no-return-doc = no and docstring-min-length = 3 | ||
""" | ||
# pylint: disable=invalid-name | ||
|
||
# Example of a function that is less than 'docstring-min-length' config option | ||
# No error message is emitted. | ||
def test_skip_docstring_min_length() -> None: | ||
"""function is too short and is missing return documentation""" | ||
return None |
7 changes: 7 additions & 0 deletions
7
tests/functional/ext/docparams/return/missing_return_doc_required_min_length.rc
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[MAIN] | ||
load-plugins = pylint.extensions.docparams | ||
|
||
[BASIC] | ||
accept-no-return-doc=no | ||
docstring-min-length=3 | ||
no-docstring-rgx=^$ |
10 changes: 10 additions & 0 deletions
10
tests/functional/ext/docparams/yield/missing_yield_doc_required_min_length.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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
"""Tests for missing-yield-doc for non-specified style docstrings | ||
with accept-no-yields-doc = no and docstring-min-length = 3 | ||
""" | ||
# pylint: disable=invalid-name | ||
|
||
# Example of a function that is less than 'docstring-min-length' config option | ||
# No error message is emitted. | ||
def test_skip_docstring_min_length(): | ||
"""function is too short and is missing yield documentation""" | ||
yield None |
7 changes: 7 additions & 0 deletions
7
tests/functional/ext/docparams/yield/missing_yield_doc_required_min_length.rc
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[MAIN] | ||
load-plugins = pylint.extensions.docparams | ||
|
||
[BASIC] | ||
accept-no-yields-doc=no | ||
docstring-min-length=3 | ||
no-docstring-rgx=^$ |