Skip to content

Fix ruff-format spacing drift in loader.py - #6910

Merged
danielhanchen merged 1 commit into
mainfrom
danielhanchen/loader-format-fix
Jul 6, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
danielhanchen/loader-format-fix

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Problem

unsloth/models/loader.py is missing the second blank line before the top-level _fix_rope_inv_freq function. ruff-format (run by the ruff-format-with-kwargs pre-commit hook) requires two blank lines before a top-level definition, so the hook reformats the file and the pre-commit run fails on main and on every PR that includes this file.

Fix

Add the one blank line the formatter expects.

Verification

Ran scripts/run_ruff_format.py across all tracked .py files (excluding the hook's own extend-exclude patterns): 1 file modified before this change (loader.py), 0 after. No other file drifts.

ruff-format requires two blank lines before a top-level function.
loader.py carried only one, so the ruff-format-with-kwargs pre-commit
hook reformats it and the run fails. This restores the expected spacing.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a minor formatting change in unsloth/models/loader.py by adding an extra blank line between the functions _maybe_advise_fla_install and _fix_rope_inv_freq. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@danielhanchen
danielhanchen merged commit cb9d902 into main Jul 6, 2026
33 of 50 checks passed
@danielhanchen
danielhanchen deleted the danielhanchen/loader-format-fix branch July 6, 2026 16:13
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.

1 participant