Skip to content

Conversation

@satvshr
Copy link
Contributor

@satvshr satvshr commented Dec 24, 2025

Metadata

Details

What does this PR implement/fix? Explain your changes.

  • Updates the ruff version in .pre-commit-config.yaml to 0.14.10
  • Runs ruff format . to align the codebase with the formatting rules of the updated Ruff version
  • Fixes also added to pass ruff check . checks
  • Add noqa tags in places that will end up changing the architecture of the function/class if I try fixing it
  • Only changes from my end to the actual code would be changing small things like:
    • the print statements to be compatible with check UP031
    • Changing variable names to _ to be compatible with RUF059

This PR is going to be a bigger one in size but in my opinion, we should be compatible with the latest ruff version and get it over with sooner rather than later.

On a separate note, there are already a significant number of noqa tags in the codebase. We should consider revisiting the architecture of the functions and classes that rely on them to better align with Ruff’s best practices. Where alignment isn’t appropriate, we should at least discuss why those components don’t need to be Ruff-compatible.

@satvshr satvshr marked this pull request as draft December 24, 2025 11:01
@satvshr satvshr marked this pull request as ready for review December 24, 2025 12:29
@codecov-commenter
Copy link

codecov-commenter commented Dec 31, 2025

Codecov Report

❌ Patch coverage is 25.35211% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.21%. Comparing base (8672ffb) to head (08885f8).

Files with missing lines Patch % Lines
openml/config.py 14.28% 6 Missing ⚠️
openml/runs/run.py 14.28% 6 Missing ⚠️
openml/datasets/data_feature.py 0.00% 5 Missing ⚠️
openml/runs/functions.py 28.57% 5 Missing ⚠️
openml/utils.py 16.66% 5 Missing ⚠️
openml/datasets/dataset.py 40.00% 3 Missing ⚠️
openml/flows/flow.py 0.00% 3 Missing ⚠️
openml/flows/functions.py 57.14% 3 Missing ⚠️
openml/_api_calls.py 0.00% 2 Missing ⚠️
openml/evaluations/functions.py 0.00% 2 Missing ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1553      +/-   ##
==========================================
+ Coverage   52.71%   56.21%   +3.49%     
==========================================
  Files          36       36              
  Lines        4325     4330       +5     
==========================================
+ Hits         2280     2434     +154     
+ Misses       2045     1896     -149     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

# sign up. Only accessing the data on OpenML does not require an account!
#
# If you don’t have an account yet, sign up now.
# If you dont have an account yet, sign up now.
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo, this should be "don't"

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

Great, thanks.

  • please go through the files and check for problems or typos. I marked a few issue above.
  • While we are at it, can you also ensure the target version for the checks is 3.10 or higher, so the from __future__ import annotations is not always added by pre-commit?

"OpenML Run URL",
"Task ID",
"OpenML Task URL" "Flow ID",
"OpenML Task URLFlow ID",
Copy link
Collaborator

Choose a reason for hiding this comment

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

typo, missing comma?

@satvshr
Copy link
Contributor Author

satvshr commented Jan 1, 2026

fixed typos and bumped target version to 3.10 (previously 3.8)

@satvshr satvshr requested a review from fkiraly January 1, 2026 18:57
@satvshr
Copy link
Contributor Author

satvshr commented Jan 1, 2026

@fkiraly I also updated the mypy version to python 3.10 (previously 3.8), I know this is out of scope for this PR, but I would have had to made 44 changes if I continued with the older version. Hope that is okay?

@satvshr satvshr changed the title [MNT] Update ruff version and format files to match latest ruff checks [MNT] Update ruff and mypy version, and format files to match latest ruff checks Jan 1, 2026
@fkiraly
Copy link
Collaborator

fkiraly commented Jan 1, 2026

@satvshr, that is great! I was already wondering where the setting was that kept adding the from __future__ import in precommit.

Copy link
Collaborator

@fkiraly fkiraly left a comment

Choose a reason for hiding this comment

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

Looks good to me, but perhaps someone else should also look at whether there is anything they spot in the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MNT] Updating ruff version for pre-commit

3 participants