Skip to content

[CI]Style: Convert test/ to ruff format(Batch #8)#7438

Merged
wangxiyuan merged 2 commits intovllm-project:mainfrom
MrZ20:lint-test-8
Apr 21, 2026
Merged

[CI]Style: Convert test/ to ruff format(Batch #8)#7438
wangxiyuan merged 2 commits intovllm-project:mainfrom
MrZ20:lint-test-8

Conversation

@MrZ20
Copy link
Copy Markdown
Contributor

@MrZ20 MrZ20 commented Mar 18, 2026

What this PR does / why we need it?

File Path
tests/ut/ops/test_activation.py
tests/ut/ops/test_comm_utils.py
tests/ut/ops/test_fused_moe.py
tests/ut/ops/test_linear.py
tests/ut/ops/test_mla.py
tests/ut/ops/test_moe_comm_method.py
tests/ut/ops/test_moe_mlp.py
tests/ut/ops/test_prepare_finalize.py
tests/ut/ops/test_token_dispatcher.py
tests/ut/ops/test_vocab_parallel_embedding.py
tests/ut/patch/worker/patch_common/test_patch_distributed.py
tests/ut/patch/worker/patch_common/test_patch_routed_experts_capturer.py
tests/ut/quantization/test_kv_c8.py
tests/ut/quantization/test_modelslim_config.py
tests/ut/quantization/test_quant_utils.py
tests/ut/quantization/test_w4a16.py
tests/ut/quantization/test_w4a4_flatquant_dynamic.py
tests/ut/quantization/test_w4a8_dynamic.py
tests/ut/quantization/test_w8a16.py
tests/ut/quantization/test_w8a8.py
tests/ut/quantization/test_w8a8_dynamic.py
tests/ut/sample/test_rejection_sampler.py
tests/ut/sample/test_sampler.py

Does this PR introduce any user-facing change?

How was this patch tested?

@MrZ20 MrZ20 requested a review from wangxiyuan as a code owner March 18, 2026 11:53
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 focuses on improving code quality and consistency by applying ruff formatting to a batch of unit test files. The changes standardize code style across various test modules, making the codebase easier to read, understand, and maintain. This is part of an ongoing effort to enforce a consistent style guide throughout the project.

Highlights

  • Code Style Enforcement: Applied ruff linting and formatting rules to a significant portion of the tests/ directory, specifically targeting unit tests within ops, patch, quantization, and sample subdirectories.
  • Configuration Update: Updated pyproject.toml to reflect the new ruff exclusion patterns, enabling linting for the newly formatted test files while maintaining exclusions for other test areas.
  • Improved Readability: Standardized code formatting across numerous test files, including import statements, function arguments, multi-line patch decorators, and dictionary/list definitions, enhancing overall code readability and consistency.
  • Removed Unused Imports: Cleaned up several test files by removing imports that were no longer used, contributing to cleaner and more efficient code.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

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

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 applies ruff format to a batch of files within the tests/ut/ directory. The changes are purely stylistic, including reformatting imports, function calls, and decorators to improve code consistency and readability. I have reviewed the changes and found no functional issues or bugs. The formatting changes are correctly applied and align with the goal of the pull request.

@github-actions
Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@MrZ20 MrZ20 changed the title [Lint]Style: Convert test/ to ruff format(Batch #8) [CI]Style: Convert test/ to ruff format(Batch #8) Apr 3, 2026
@MrZ20 MrZ20 closed this Apr 3, 2026
@MrZ20 MrZ20 reopened this Apr 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 8, 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Signed-off-by: MrZ20 <2609716663@qq.com>
@MrZ20 MrZ20 reopened this Apr 20, 2026
Signed-off-by: MrZ20 <2609716663@qq.com>
@wangxiyuan wangxiyuan merged commit 66eea45 into vllm-project:main Apr 21, 2026
36 checks passed
@MrZ20 MrZ20 deleted the lint-test-8 branch April 21, 2026 03:13
tfhddd pushed a commit to ascend-gha-runners/vllm-ascend that referenced this pull request Apr 21, 2026
### What this PR does / why we need it?
| File Path |
| :--- |
| `tests/ut/ops/test_activation.py` |
| `tests/ut/ops/test_comm_utils.py` |
| `tests/ut/ops/test_fused_moe.py` |
| `tests/ut/ops/test_linear.py` |
| `tests/ut/ops/test_mla.py` |
| `tests/ut/ops/test_moe_comm_method.py` |
| `tests/ut/ops/test_moe_mlp.py` |
| `tests/ut/ops/test_prepare_finalize.py` |
| `tests/ut/ops/test_token_dispatcher.py` |
| `tests/ut/ops/test_vocab_parallel_embedding.py` |
| `tests/ut/patch/worker/patch_common/test_patch_distributed.py` |
|
`tests/ut/patch/worker/patch_common/test_patch_routed_experts_capturer.py`
|
| `tests/ut/quantization/test_kv_c8.py` |
| `tests/ut/quantization/test_modelslim_config.py` |
| `tests/ut/quantization/test_quant_utils.py` |
| `tests/ut/quantization/test_w4a16.py` |
| `tests/ut/quantization/test_w4a4_flatquant_dynamic.py` |
| `tests/ut/quantization/test_w4a8_dynamic.py` |
| `tests/ut/quantization/test_w8a16.py` |
| `tests/ut/quantization/test_w8a8.py` |
| `tests/ut/quantization/test_w8a8_dynamic.py` |
| `tests/ut/sample/test_rejection_sampler.py` |
| `tests/ut/sample/test_sampler.py` |

### Does this PR introduce _any_ user-facing change?

### How was this patch tested?

- vLLM version: v0.17.0
- vLLM main:
vllm-project/vllm@4497431

---------

Signed-off-by: MrZ20 <2609716663@qq.com>
Signed-off-by: tfhddd <2272751277@qq.com>
anning-2026 pushed a commit to anning-2026/vllm-ascend that referenced this pull request Apr 21, 2026
…-project#7438)

### What this PR does / why we need it?
| File Path |
| :--- |
| `tests/ut/ops/test_activation.py` |
| `tests/ut/ops/test_comm_utils.py` |
| `tests/ut/ops/test_fused_moe.py` |
| `tests/ut/ops/test_linear.py` |
| `tests/ut/ops/test_mla.py` |
| `tests/ut/ops/test_moe_comm_method.py` |
| `tests/ut/ops/test_moe_mlp.py` |
| `tests/ut/ops/test_prepare_finalize.py` |
| `tests/ut/ops/test_token_dispatcher.py` |
| `tests/ut/ops/test_vocab_parallel_embedding.py` |
| `tests/ut/patch/worker/patch_common/test_patch_distributed.py` |
|
`tests/ut/patch/worker/patch_common/test_patch_routed_experts_capturer.py`
|
| `tests/ut/quantization/test_kv_c8.py` |
| `tests/ut/quantization/test_modelslim_config.py` |
| `tests/ut/quantization/test_quant_utils.py` |
| `tests/ut/quantization/test_w4a16.py` |
| `tests/ut/quantization/test_w4a4_flatquant_dynamic.py` |
| `tests/ut/quantization/test_w4a8_dynamic.py` |
| `tests/ut/quantization/test_w8a16.py` |
| `tests/ut/quantization/test_w8a8.py` |
| `tests/ut/quantization/test_w8a8_dynamic.py` |
| `tests/ut/sample/test_rejection_sampler.py` |
| `tests/ut/sample/test_sampler.py` |

### Does this PR introduce _any_ user-facing change?

### How was this patch tested?

- vLLM version: v0.17.0
- vLLM main:
vllm-project/vllm@4497431

---------

Signed-off-by: MrZ20 <2609716663@qq.com>
guxin108 pushed a commit to guxin108/vllm-ascend that referenced this pull request Apr 24, 2026
…-project#7438)

### What this PR does / why we need it?
| File Path |
| :--- |
| `tests/ut/ops/test_activation.py` |
| `tests/ut/ops/test_comm_utils.py` |
| `tests/ut/ops/test_fused_moe.py` |
| `tests/ut/ops/test_linear.py` |
| `tests/ut/ops/test_mla.py` |
| `tests/ut/ops/test_moe_comm_method.py` |
| `tests/ut/ops/test_moe_mlp.py` |
| `tests/ut/ops/test_prepare_finalize.py` |
| `tests/ut/ops/test_token_dispatcher.py` |
| `tests/ut/ops/test_vocab_parallel_embedding.py` |
| `tests/ut/patch/worker/patch_common/test_patch_distributed.py` |
|
`tests/ut/patch/worker/patch_common/test_patch_routed_experts_capturer.py`
|
| `tests/ut/quantization/test_kv_c8.py` |
| `tests/ut/quantization/test_modelslim_config.py` |
| `tests/ut/quantization/test_quant_utils.py` |
| `tests/ut/quantization/test_w4a16.py` |
| `tests/ut/quantization/test_w4a4_flatquant_dynamic.py` |
| `tests/ut/quantization/test_w4a8_dynamic.py` |
| `tests/ut/quantization/test_w8a16.py` |
| `tests/ut/quantization/test_w8a8.py` |
| `tests/ut/quantization/test_w8a8_dynamic.py` |
| `tests/ut/sample/test_rejection_sampler.py` |
| `tests/ut/sample/test_sampler.py` |

### Does this PR introduce _any_ user-facing change?

### How was this patch tested?

- vLLM version: v0.17.0
- vLLM main:
vllm-project/vllm@4497431

---------

Signed-off-by: MrZ20 <2609716663@qq.com>
Signed-off-by: guxin108 <1252896542@qq.com>
zouyida2052 pushed a commit to zouyida2052/vllm-ascend that referenced this pull request Apr 28, 2026
…-project#7438)

### What this PR does / why we need it?
| File Path |
| :--- |
| `tests/ut/ops/test_activation.py` |
| `tests/ut/ops/test_comm_utils.py` |
| `tests/ut/ops/test_fused_moe.py` |
| `tests/ut/ops/test_linear.py` |
| `tests/ut/ops/test_mla.py` |
| `tests/ut/ops/test_moe_comm_method.py` |
| `tests/ut/ops/test_moe_mlp.py` |
| `tests/ut/ops/test_prepare_finalize.py` |
| `tests/ut/ops/test_token_dispatcher.py` |
| `tests/ut/ops/test_vocab_parallel_embedding.py` |
| `tests/ut/patch/worker/patch_common/test_patch_distributed.py` |
|
`tests/ut/patch/worker/patch_common/test_patch_routed_experts_capturer.py`
|
| `tests/ut/quantization/test_kv_c8.py` |
| `tests/ut/quantization/test_modelslim_config.py` |
| `tests/ut/quantization/test_quant_utils.py` |
| `tests/ut/quantization/test_w4a16.py` |
| `tests/ut/quantization/test_w4a4_flatquant_dynamic.py` |
| `tests/ut/quantization/test_w4a8_dynamic.py` |
| `tests/ut/quantization/test_w8a16.py` |
| `tests/ut/quantization/test_w8a8.py` |
| `tests/ut/quantization/test_w8a8_dynamic.py` |
| `tests/ut/sample/test_rejection_sampler.py` |
| `tests/ut/sample/test_sampler.py` |

### Does this PR introduce _any_ user-facing change?

### How was this patch tested?

- vLLM version: v0.17.0
- vLLM main:
vllm-project/vllm@4497431

---------

Signed-off-by: MrZ20 <2609716663@qq.com>
Signed-off-by: zouyida2052 <zouyida2002@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants