-
Notifications
You must be signed in to change notification settings - Fork 4
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
utilizing ruff
for formatting & linting – #20
#31
utilizing ruff
for formatting & linting – #20
#31
Conversation
Running
results in:
There are actually far fewer linting issues than I anticipated and - from what I can tell - all are trivial fixes. Great job at writing future-proof code @carsonfarmer ! |
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #31 +/- ##
========================================
- Coverage 100.0% 99.2% -0.8%
========================================
Files 2 2
Lines 127 125 -2
========================================
- Hits 127 124 -3
- Misses 0 1 +1
|
res = min(l, key=itemgetter(0)) | ||
neigh = fp.neighbors[new] | ||
l_ = [(fp.dist(a, b), b) for a, b in zip(cycle([new]), ps)] | ||
res = min(l_, key=itemgetter(0)) # noqa: F841 |
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 wasn't sure if res
and neigh
were actually needed for something, but not being testing so I left in and added logic for ruff
to ignore.
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.
they were used in the following asserts, but have been commented out for reasons I am no longer aware of :P
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.
So we could either turn those back on, or just drop res and neigh I suspect.
res = min(l, key=itemgetter(0)) | ||
neigh = fp.neighbors[new] | ||
l_ = [(fp.dist(a, b), b) for a, b in zip(cycle([new]), ps)] | ||
res = min(l_, key=itemgetter(0)) # noqa: F841 |
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.
they were used in the following asserts, but have been commented out for reasons I am no longer aware of :P
res = min(l, key=itemgetter(0)) | ||
neigh = fp.neighbors[new] | ||
l_ = [(fp.dist(a, b), b) for a, b in zip(cycle([new]), ps)] | ||
res = min(l_, key=itemgetter(0)) # noqa: F841 |
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.
So we could either turn those back on, or just drop res and neigh I suspect.
Co-authored-by: Carson Farmer <carson.farmer@gmail.com>
utilizing
ruff
for formatting & linting – #20base.py