chore: fix ruff lint failure#687
Merged
Merged
Conversation
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.
Summary
empty_stridedimport fromtests/test_kv_caching_infinilm.py.ruff checkpass onmaster.Motivation
The latest Ruff workflow on
masterfailed before reaching theruff format --checkstep becauseruff checkreported an unused import intests/test_kv_caching_infinilm.py.No related issue.
Type of Change
feat— new feature / new operator / new platformfix— bug fixperf— performance improvement (no behavioral change)refactor— code restructuring without behavior changetest— adding or fixing tests onlydocs— documentation onlybuild/ci— build system or CI configurationchore— tooling, formatting, or other non-code changes!in the Conventional Commits prefix or aBREAKING CHANGE:footer)Platforms Affected
WITH_CPU)WITH_NVIDIA)WITH_ILUVATAR)WITH_METAX)WITH_CAMBRICON)WITH_MOORE)WITH_ASCEND)WITH_TORCH)Smoke Test Result
Test Results on Supported Platforms
Full `pytest` output (optional)
Benchmark / Performance Impact
N/A - this removes an unused Python import only.
Notes for Reviewers
The failing GitHub Actions run was
Ruffonmasterfor commit48e2f9841d93274ed8d7c75fade2725e6358d30c. The firstchartboost/ruff-action@v1step failed, and theformat --checkstep was skipped.Checklist
Title, Branch, and Commits
feat(nvidia): …,fix(cuda/gemm): …).<type>/xxx-yyyy-zzzzwhere<type>matches the PR title's Conventional Commits type and words are joined with hyphens (seeCONTRIBUTING.md§Branches).CONTRIBUTING.md§Pull Requests).master— the branch is rebased cleanly on top of the currentmaster.fixup!/squash!/wipcommits remain.Scope and Design
CONTRIBUTING.md§Code/General).printf/std::cout/print(...)left behind, orTODOwithout an owner and issue link.General Code Hygiene (applies to all languages)
CONTRIBUTING.md§Code/General).CONTRIBUTING.md§Code/General).the `seqlens_k` tensor) (CONTRIBUTING.md§Code/General). N/A - no comments or error messages changed.CONTRIBUTING.md§Code/General). N/A - no comments or error messages changed.CONTRIBUTING.md§Code/General; §Python). N/A - no comments or error messages changed.C++ Specific (if C++ files changed)
N/A - no C++ files changed.
Python Specific (if Python files changed)
ruff checkpasses cleanly on CI (see.github/workflows/ruff.yml).ruff format --checkpasses cleanly — if not, runruff formatand commit the result.CONTRIBUTING.md§Python). N/A - no comments changed.pytest.skipmessages without terminal period) are honored where applicable. N/A - no messages changed.if,for, and similar control-flow statements. N/A - no control flow changed.return, except when it directly follows a control-flow statement. N/A - no returns changed.Testing
N/A - not affected; any affected platform that could not be tested has an explicit reason and a reviewer or owner with access tagged.tests/followingtests/test_add.py/tests/test_gemm.pypatterns. N/A - no new functionality.pytest.mark.parametrizecorrectly. N/A - no test parameterization changed.pytest.mark.auto_act_and_assertis used and the test returns aPayloadwhosefuncandrefshare the same calling convention. N/A - no test bodies changed.dtype/deviceparameterization is relied on, or overridden with an explicitpytest.mark.parametrizewhen necessary. N/A - no parameterization changed.pytest -n 1. N/A - no new tests.masterand passes with this PR. N/A - lint-only cleanup; localruff checkcovers the regression.Build, CI, and Tooling
pip install .[dev]on at least one affected platform. N/A - no build-affecting change.compile_commands.jsonstill regenerates (CMake optionCMAKE_EXPORT_COMPILE_COMMANDS=ONinpyproject.toml— required by thecode-lintskill andclang-tidy -p). N/A - CMake configuration unchanged.CMakeLists.txtunderif(AUTO_DETECT_DEVICES)and toif(AUTO_DETECT_BACKENDS)if applicable. N/A - no backend changes.CMakeLists.txtis not broken. N/A - no backend changes.clang-format.yml,ruff.yml) are green locally (or expected to be green on CI). Localruff checkandruff format --checkpassed;clang-formatis N/A because no C++ files changed.pyproject.toml's[project.optional-dependencies](or justified in the PR description).Documentation
README.md,CONTRIBUTING.md, or inline docs updated when behavior, build flags, or developer workflow changed. N/A - no behavior or workflow changed.!orBREAKING CHANGE:footer. N/A - no breaking change.Security and Safety