Skip to content
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

Fix updated linters errors #172

Merged
merged 4 commits into from
Feb 5, 2025
Merged

Fix updated linters errors #172

merged 4 commits into from
Feb 5, 2025

Conversation

mkmkme
Copy link
Collaborator

@mkmkme mkmkme commented Feb 5, 2025

Pull Request check-list

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?

Description of change

This PR contains 4 commits:

  1. Fix the error with new version of isort
  2. Fix the error with the new version of flynt
  3. Fix the error with the new version of black
  4. Fix the test failure caused by the floating-point error on ARM64.

Apparently new version of isort started failing on our codebase because
it expects the import to be formatted in a different way. This commit is
just a result of running `isort .` in the repo root.

Signed-off-by: Mikhail Koviazin <[email protected]>
Flynt started erroring out the old-style formatting. Let's fix it.

Signed-off-by: Mikhail Koviazin <[email protected]>
New version of black formatter started forcefully changing hexadecimal
representation of bytes to lowercase. Let's fix it in the codebase.

Signed-off-by: Mikhail Koviazin <[email protected]>
The tests expected exactly "88.05060698409301" as Valkey georadius
result. However, on ARM64 machine the actual result is
"88.05060698338646". The difference is roughly 7e-10 and is not caused
by valkey-py, but rather a floating point error in georadius
calculations inside Valkey. This commit allows such an error to happen
without failing the test.

Signed-off-by: Mikhail Koviazin <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Feb 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 76.26%. Comparing base (457be2d) to head (05e1f31).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #172      +/-   ##
==========================================
- Coverage   76.26%   76.26%   -0.01%     
==========================================
  Files         130      130              
  Lines       33956    33964       +8     
==========================================
+ Hits        25897    25901       +4     
- Misses       8059     8063       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@bogdanp05 bogdanp05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm.
We should look into using uv for linting and formatting at some point.

@mkmkme
Copy link
Collaborator Author

mkmkme commented Feb 5, 2025

I'll create a ticket to consider using uv, thanks!

@mkmkme mkmkme enabled auto-merge February 5, 2025 13:35
@mkmkme mkmkme merged commit 2d648a4 into main Feb 5, 2025
94 checks passed
@mkmkme mkmkme deleted the mkmkme/fix-isort branch February 5, 2025 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants