This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent D103 errors when the function is decorated with @overload and…
… add D418 (#511) * Preventing the D103 error when the function is decorated with @overload. Added an is_overload method in the function class(parser.py). Added an if statement so that the D103 error will not trigger when decorated with @overload(checker.py) Added some tests to see that it's working correctly. * Preventing the D103 error when the function is decorated with @overload. Added an is_overload method in the function class(parser.py). Added an if statement so that the D103 error will not trigger when decorated with @overload(checker.py) Added some tests to see that it's working correctly. * Added an is_overload method in the function class(parser.py). Added an if statement so that the D103 error will not trigger when decorated with @overload(checker.py) Added some tests to see that it's working correctly. * Fixing overload test. * Fixing overload test. Running isort src/pydocstyle * Added D418 Error: Function decorated with @overload shouldn\'t contain a docstring. * Overloaded functions shouldn't have a definition. * Tests for D418 error: Functions decorated with @overload * Tests for D418 error: Functions decorated with @overload * Tests for D418 error: Functions decorated with @overload * Added Tests for nested_functions/methods that are decorated with @overload checker is also preventing the 102 error in methods that are decorated with @overload. (checker.py) Any suggestions on how to write those if statements more elegantly? I really don't like the nested if statement. * Added Tests for valid overloaded functions, valid overloaded Method and overloaded Methods with D418 Error. * Added Tests for valid overloaded nested functions. * release_notes.rst updated. * release_notes.rst updated.
- Loading branch information
1 parent
d85735e
commit 7921a6d
Showing
6 changed files
with
295 additions
and
11 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
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
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
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