This repository was archived by the owner on Nov 3, 2023. It is now read-only.
Commit d85735e
Adding tests for parsing one line functions/ Fixing parser bug. (#499)
* Added tests for parsing "One line functions"
The tests look valid but don't pass.
from debugging looks like the parser cant find the decorator, although it has no problem finding the function and accepting it as valid.
* Fix parser.py to work on one line functions.
* PEP8 fixes.
* Adding a test for multiple decorators over a "single line function".
* Added tests for single line function with decorator.
1. oneliner_with_decorator_expecting_errors(): The decorator is not ignored, expecting the D400, D415 errors.
2. valid_oneliner_with_decorator(): A valid one line function that shouldn't produce any errors.
* Added tests for single line function with decorator.
1. oneliner_with_decorator_expecting_errors(): The decorator is not ignored, expecting the D400, D415 errors.
2. valid_oneliner_with_decorator(): A valid one line function that shouldn't produce any errors.
Co-authored-by: Sambhav Kothari <[email protected]>1 parent 5cbac26 commit d85735e
File tree
4 files changed
+45
-2
lines changed- src
- pydocstyle
- tests
- test_cases
4 files changed
+45
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
686 | | - | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
687 | 689 | | |
688 | 690 | | |
689 | 691 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
883 | 896 | | |
884 | 897 | | |
885 | 898 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
340 | 367 | | |
341 | 368 | | |
342 | 369 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
0 commit comments