-
Notifications
You must be signed in to change notification settings - Fork 187
Adding tests for parsing one line functions/ Fixing parser bug. #499
Conversation
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.
pass | ||
|
||
|
||
@ignored_decorator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a test case next to this one with a single line definition similar to this one that doesn't have an ignored decorator and raises errors and another one that has a single line definition with a docstring that doesn't raise any errors(again with a non ignored decorator) to check that everything is working as expected in this context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea :)
Are the tests I added meet the criteria?
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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks for the PR!
@theyuvalraz I see that we forgot to update the release notes for this PR. Can you please add a separate PR that updates them and references this one? |
update release notes for PyCQA#499
No description provided.