-
Notifications
You must be signed in to change notification settings - Fork 1
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
Linting and code formatting #2
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2 +/- ##
==========================================
+ Coverage 79.38% 79.59% +0.21%
==========================================
Files 2 2
Lines 97 98 +1
==========================================
+ Hits 77 78 +1
Misses 20 20
☔ View full report in Codecov by Sentry. |
You can take a look at https://pre-commit.ci/ so that you can integrate black in your CI |
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 use of typing! much clearer now
@Batalex I have not entirely understood this service yet. I add black to the pre-commit file (which I haven't created it), and then this service will automatically perform the precommit as part of the CI? |
Yes, that is the idea. I have yet to use this service myself, so this is not by any means required for our review process. |
I tried it and it seems to work :) I will convert this draft to a PR, I think we are good to go with this one, too |
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.
I noticed a few typos in the code (treshold
instead of threshold
). It's up to you if you want to fix it in this PR.
Otherwise, LGTM ✔︎
tests/test_analysis.py
Outdated
5., 5., 5., 5., 4., 5., 5., 5., 5., 5., 5., 5., | ||
2., 1., 4., 3., 3., 5., 3., 2., 1., 1., 5., 3., | ||
3., 3., 5., 2., 2., 5., 0., 4., 4.] | ||
expected = [ |
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.
If you'd like, you could use comments to disable black for these lines:
# fmt: off
expected = [...]
# fmt: on
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.
oh yes, great, I already wondered if this is really the intended behavior in this case, listing one value in each line. I didn't know that black could be disabled for specific lines, will do
Hi everyone,
in this PR/on this branch I'm trying to collect commits related to general code formatting and linting.
These are the issues I've addressed or plan to address (I added names according to who gave me feedback on this, but of course feel free to review any of them!):
Best,
@katoss