New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
start linting test files #3600
start linting test files #3600
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #3600 +/- ##
=======================================
Coverage 99.86% 99.86%
=======================================
Files 313 313
Lines 28075 28075
=======================================
Hits 28038 28038
Misses 37 37
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
For new tests, will they have to be added to |
@trbromley still thinking about what to do with new tests but maybe |
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.
Nice!
Would be good to give a way for devs to run this locally. Perhaps a shell script?
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, but would be good to have someone more knowledgeable to approve
Here's an example run that fails when I added a new test file but didn't whitelist it, and the passing run once I whitelisted it. |
35101ea
to
3ccb52b
Compare
This reverts commit 0e53fa7.
Context:
pylint doesn't run for our test files for historical-only reasons, which isn't great. A full solution to this build-up of linting errors will take time, but a first step can be taken! We started talking about this today because we found two tests with the same name in some files, and that can cause unexpected behaviour. Idek if pylint catches that, but either way it sparked a conversation.
Description of the Change:
make lint
andmake lint-test
target to run pylint on the respective parts of the codebase# pylint:disable
comments (and one actual linting fix!) to files inpennylane/
to ensure the above-mentionedmake lint
passes locally at the time of this PRmake lint-test
is ugly today - should the target only run on whitelisted files?Benefits:
Our test files will be much cleaner, more readable, and sometimes more correct!
Possible Drawbacks:
Other Remarks