Skip to content

Apply ruff format and lint autofixes across the codebase#102

Merged
antonpibm merged 2 commits into
generative-computing:mainfrom
aviv1ron1:chore/ruff-format-autofixes
Jul 21, 2026
Merged

Apply ruff format and lint autofixes across the codebase#102
antonpibm merged 2 commits into
generative-computing:mainfrom
aviv1ron1:chore/ruff-format-autofixes

Conversation

@aviv1ron1

Copy link
Copy Markdown
Collaborator

What

Applies ruff format and ruff --fix (lint autofixes) across the entire codebase. Pure mechanical reformatting — no behavioral changes.

Why

This is the first of a two-PR split. Isolating the bulk reformat into its own commit/PR lets us record its SHA in .git-blame-ignore-revs so git blame skips past the reformat to the real authorship of each line. The follow-up PR carries the CI/CD work and adds this commit's landed SHA to the ignore file.

Scope

  • 116 files changed (106 .py, 8 .ipynb, 1 .toml)
  • No logic changes — formatting and safe lint autofixes only

After merge

Note the SHA this lands as on main; it goes into .git-blame-ignore-revs in the CI/CD PR.

Signed-off-by: aviv ron <rona@il.ibm.com>
…re file

ruff's F401 autofix removed 'import granite_switch.hf' from hello_adapter.ipynb
and granite_switch_with_hf.ipynb. That import is used only for its side effect:
it registers the granite_switch architecture with transformers' AutoConfig/
AutoModelForCausalLM. Without it, the AutoModelForCausalLM.from_pretrained calls
in both notebooks fail to recognize the model_type, so the tutorials break.
Restore the import with a '# noqa: F401' guard so the reformat stays behavior-
preserving.

Also remove .git-blame-ignore-revs: the merge squashes this branch into a new
commit, so the SHA to ignore isn't known until after merge. The pre-filled SHA
never matched this branch's commit. The ignore entry will be added in a
follow-up once the squashed commit lands on main.

Signed-off-by: aviv ron <rona@il.ibm.com>
@antonpibm
antonpibm merged commit c8d4a4a into generative-computing:main Jul 21, 2026
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.

2 participants