Repository navigation
Conversation
Applies `ruff check --fix --unsafe-fixes` for the new default rules (mostly C408 in tests), excluding TC004, PIE790 and PLE0704. The `select` pin is kept; it is dropped in a follow-up. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
hirosassa
requested review from
Hi-king,
hiro-o918,
kitagry,
mamo3gr,
mski-iksm,
ujiuji1259 and
yokomotod
as code owners
November 23, 2026 20:45
kitagry
approved these changes
Nov 25, 2026
kitagry
left a comment
Member
There was a problem hiding this comment.
LGTM. I reproduced the change on the base commit (ed97b07): with the select pin removed, ruff check --fix --unsafe-fixes --extend-ignore TC004,PIE790,PLE0704 followed by ruff format gives exactly this diff, so there are no hand edits to look for. ruff check, ruff format, pyright (0 errors) and pytest -n auto (873 passed) pass locally.
I went through the rewrites that could change behavior one by one, and none does:
raise e->raise(TRY201,task_lock_wrappers.py): the bareraisere-raises the same exception; the only difference is one fewer traceback line.__enter__ -> Self/gokart_deserialize -> Self(PYI034/PYI019): typing only;Selfis fine withrequires-python >= 3.11.removesuffix('/')(FURB188),.values()(PERF102),isinstance(x, (list, tuple)),all(<generator>),x != yfornot x == y, and the collapsedifs (SIM102/SIM114) keep the same short-circuit order and results.__all__sorting (RUF022) does not change what is exported.- C408: every rewritten
dict(...)takes only keyword arguments, so the literals are equivalent. - The TC004 fix is not included, so the lazy imports in
gcs_config.py/s3_config.pyare untouched.
Two nits, neither blocking:
gokart/file_processor/__init__.py: RUF022 sorted__all__across the group comments, so# Base classes and types/# DataFrame processors/# Common processorsnow sit above the wrong names. I'd drop the comments (or the follow-up PR can do it).gokart/parameter.py: after the PYI019 fix,T = TypeVar('T')is no longer used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #698 (step 2 of the plan in the thread)
What
Ran
ruff check --fix --unsafe-fixeswith the ruff 0.17 default rules (theselectpin is temporarily removed for the run, and kept in the commit), excluding:gcs_config.py/s3_config.py(manual follow-up).32 files, mostly
dict(...)-> literals (C408) in tests. Non-test changes are__all__sorting (RUF022),isinstancetuple merge,raise e->raise,removesuffix,__enter__ -> Self, collapsedwith/if.Not in this PR
Manual fixes (PYI036/PYI034, SIM115, RUF012, TC004, ...) and dropping the
selectpin with theignorelist.Verification
ruff check, ruff format, pyright (0 errors) and the full pytest suite (873 passed) pass locally.
🤖 Generated with Claude Code