Fix ruff formatting in CI and replace isort in CI with ruff#477
Fix ruff formatting in CI and replace isort in CI with ruff#477
Conversation
Summary of ChangesHello @garrett4wade, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request streamlines the project's code formatting and linting by fully embracing Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request transitions from isort to ruff for import sorting and formatting, which is a great move towards modern tooling. However, the scope of this PR seems larger than described. It also includes a significant refactoring to decouple the areal package from realhf, which has led to some code duplication (e.g., logging.py, name_resolve.py). It would be beneficial to update the PR description to reflect these architectural changes for better clarity and to facilitate a more focused review. My review includes feedback on both the tooling changes and the refactoring. Additionally, since isort is being replaced by ruff, consider removing the legacy [tool.isort] configuration from pyproject.toml to avoid confusion.
Description
ruffandisorthave annoying conflicts. We'd like to transit to the modernruffpackage anyways, so we decide to totally remove the usage ofisortand useruffinstead.We will also remove
blackandautoflakegradually in the future.Related Issue
N/A
Type of Change
work as expected)
Checklist
jb build docs/gemini review)Breaking Change Details (if applicable):
N/A
Additional Context
N/A