From 01914445b0513ab355b1275acec2f2e5da4d91d6 Mon Sep 17 00:00:00 2001 From: Harry Mellor <19981378+hmellor@users.noreply.github.com> Date: Thu, 26 Feb 2026 11:01:01 +0000 Subject: [PATCH] Remove `bc-lint` (#35274) Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> --- .github/.bc-linter.yml | 24 ---------------- .github/workflows/bc-lint.yml | 29 ------------------- vllm/__init__.py | 6 ---- vllm/_bc_linter.py | 54 ----------------------------------- vllm/v1/core/sched/output.py | 5 ---- 5 files changed, 118 deletions(-) delete mode 100644 .github/.bc-linter.yml delete mode 100644 .github/workflows/bc-lint.yml delete mode 100644 vllm/_bc_linter.py diff --git a/.github/.bc-linter.yml b/.github/.bc-linter.yml deleted file mode 100644 index 443dfa45a..000000000 --- a/.github/.bc-linter.yml +++ /dev/null @@ -1,24 +0,0 @@ -# doc: https://github.com/pytorch/test-infra/blob/main/tools/stronghold/docs/bc_linter_config.md -version: 1 -paths: -# We temporarily disable globally, and will only enable with `annotations.include` -# include: -# - "vllm/v1/attetion/*.py" -# - "vllm/v1/core/*.py" -exclude: - - "**/*.py" - -scan: - functions: true # check free functions and methods - classes: true # check classes/dataclasses - public_only: true # ignore names starting with "_" at any level - -annotations: - include: # decorators that force‑include a symbol - - name: "bc_linter_include" # matched by simple name or dotted suffix - propagate_to_members: false # for classes, include methods/inner classes - exclude: # decorators that force‑exclude a symbol - - name: "bc_linter_skip" # matched by simple name or dotted suffix - propagate_to_members: true # for classes, exclude methods/inner classes - -excluded_violations: [] # e.g. ["ParameterRenamed", "FieldTypeChanged"] diff --git a/.github/workflows/bc-lint.yml b/.github/workflows/bc-lint.yml deleted file mode 100644 index 823695a92..000000000 --- a/.github/workflows/bc-lint.yml +++ /dev/null @@ -1,29 +0,0 @@ -name: BC Lint - -on: - pull_request: - types: - - opened - - synchronize - - reopened - - labeled - - unlabeled - -jobs: - bc_lint: - if: github.repository_owner == 'vllm-project' - runs-on: ubuntu-latest - steps: - - name: Run BC Lint Action - uses: pytorch/test-infra/.github/actions/bc-lint@main - with: - repo: ${{ github.event.pull_request.head.repo.full_name }} - base_sha: ${{ github.event.pull_request.base.sha }} - head_sha: ${{ github.event.pull_request.head.sha }} - suppression: ${{ contains(github.event.pull_request.labels.*.name, 'suppress-bc-linter') }} - docs_link: 'https://github.com/pytorch/test-infra/wiki/BC-Linter' - config_dir: .github - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} - cancel-in-progress: true diff --git a/vllm/__init__.py b/vllm/__init__.py index 19b2cdc67..968d1a143 100644 --- a/vllm/__init__.py +++ b/vllm/__init__.py @@ -14,8 +14,6 @@ import typing import vllm.env_override # noqa: F401 MODULE_ATTRS = { - "bc_linter_skip": "._bc_linter:bc_linter_skip", - "bc_linter_include": "._bc_linter:bc_linter_include", "AsyncEngineArgs": ".engine.arg_utils:AsyncEngineArgs", "EngineArgs": ".engine.arg_utils:EngineArgs", "AsyncLLMEngine": ".engine.async_llm_engine:AsyncLLMEngine", @@ -62,8 +60,6 @@ if typing.TYPE_CHECKING: from vllm.pooling_params import PoolingParams from vllm.sampling_params import SamplingParams from vllm.v1.executor.ray_utils import initialize_ray_cluster - - from ._bc_linter import bc_linter_include, bc_linter_skip else: def __getattr__(name: str) -> typing.Any: @@ -79,8 +75,6 @@ else: __all__ = [ "__version__", - "bc_linter_skip", - "bc_linter_include", "__version_tuple__", "LLM", "ModelRegistry", diff --git a/vllm/_bc_linter.py b/vllm/_bc_linter.py deleted file mode 100644 index 2929a8bce..000000000 --- a/vllm/_bc_linter.py +++ /dev/null @@ -1,54 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 -# SPDX-FileCopyrightText: Copyright contributors to the vLLM project -# vllm/_bc_linter.py -from collections.abc import Callable -from typing import Any, TypeVar, overload - -T = TypeVar("T") - - -@overload -def bc_linter_skip(obj: T) -> T: ... - - -@overload -def bc_linter_skip(*, reason: str | None = ...) -> Callable[[T], T]: ... - - -def bc_linter_skip(obj: Any = None, *, reason: str | None = None): - """ - No-op decorator to mark symbols/files for BC-linter suppression. - - Usage: - @bc_linter_skip - def legacy_api(...): ... - """ - - def _wrap(x: T) -> T: - return x - - return _wrap if obj is None else obj - - -@overload -def bc_linter_include(obj: T) -> T: ... - - -@overload -def bc_linter_include(*, reason: str | None = ...) -> Callable[[T], T]: ... - - -def bc_linter_include(obj: Any = None, *, reason: str | None = None): - """ - Usage: - @bc_linter_include - def public_api(...): ... - """ - - def _wrap(x: T) -> T: - return x - - return _wrap if obj is None else obj - - -__all__ = ["bc_linter_skip", "bc_linter_include"] diff --git a/vllm/v1/core/sched/output.py b/vllm/v1/core/sched/output.py index 7e53f4f2e..0f6ac98fd 100644 --- a/vllm/v1/core/sched/output.py +++ b/vllm/v1/core/sched/output.py @@ -5,8 +5,6 @@ from dataclasses import dataclass from functools import cached_property from typing import TYPE_CHECKING -from vllm._bc_linter import bc_linter_include - if TYPE_CHECKING: import numpy as np import numpy.typing as npt @@ -29,7 +27,6 @@ else: Request = object -@bc_linter_include @dataclass class NewRequestData: req_id: str @@ -109,7 +106,6 @@ class NewRequestData: ) -@bc_linter_include @dataclass class CachedRequestData: req_ids: list[str] @@ -179,7 +175,6 @@ class CachedRequestData: ) -@bc_linter_include @dataclass class SchedulerOutput: # list of the requests that are scheduled for the first time.