[CI] Fix ruff docstring violations in EC connector files (#57283)

Signed-off-by: khluu <khluu000@gmail.com>

Kevin H. Luu committed Sep 16, 2026 at 21:13 UTC 0bfc7a15d095fe83ecc82b50561a93c177fece2d
2 files changed +9 -19
vllm/distributed/ec_transfer/ec_connector/base.py
+3 -6
@@ -226,8 +226,7 @@ class ECConnectorBase(ABC):
226 return None
227
228 def get_ec_connector_stats(self) -> "ECConnectorStats | None":
229 - """
230 - Get the EC connector stats collected during the last interval.
229 + """Get the EC connector stats collected during the last interval.
230
231 Callable on either a worker-side or scheduler-side connector
232 instance: the worker-side instance reports stats gathered during
@@ -358,8 +357,7 @@ class ECConnectorBase(ABC):
357 def build_ec_connector_stats(
358 cls, data: dict[str, Any] | None = None
359 ) -> "ECConnectorStats | None":
361 - """
362 - ECConnectorStats resolution method. This method allows dynamically
360 + """ECConnectorStats resolution method. This method allows dynamically
361 registered connectors to return their own ECConnectorStats object,
362 which can implement custom aggregation logic on the data dict.
363 """
@@ -373,8 +371,7 @@ class ECConnectorBase(ABC):
371 labelnames: list[str],
372 per_engine_labelvalues: dict[int, list[object]],
373 ) -> "ECConnectorPromMetrics | None":
376 - """
377 - Create an ECConnectorPromMetrics subclass which should register
374 + """Create an ECConnectorPromMetrics subclass which should register
375 per-connector Prometheus metrics and implement observe() to
376 expose connector transfer stats via Prometheus.
377 """
vllm/distributed/ec_transfer/ec_connector/metrics.py
+6 -13
@@ -17,8 +17,7 @@ logger = init_logger(__name__)
17
18 @dataclass
19 class ECConnectorStats:
20 - """
21 - Base class for EC Connector Stats, a container for transfer performance
20 + """Base class for EC Connector Stats, a container for transfer performance
21 metrics or otherwise important telemetry from the connector.
22 All sub-classes need to be serializable as stats are sent from worker to
23 logger process.
@@ -31,14 +30,11 @@ class ECConnectorStats:
30 raise NotImplementedError
31
32 def aggregate(self, other: "ECConnectorStats") -> "ECConnectorStats":
34 - """
35 - Aggregate stats with another `ECConnectorStats` object.
36 - """
33 + """Aggregate stats with another `ECConnectorStats` object."""
34 raise NotImplementedError
35
36 def reduce(self) -> dict[str, int | float]:
40 - """
41 - Reduce the observations collected during a time interval to one or
37 + """Reduce the observations collected during a time interval to one or
38 more representative values (eg avg/median/sum of the series).
39 This is meant to be called by the logger to produce a summary of the
40 stats for the last time interval.
@@ -107,8 +103,7 @@ class ECConnectorLogging:
103
104
105 class ECConnectorPromMetrics:
110 - """
111 - A base class for per-connector Prometheus metric registration
106 + """A base class for per-connector Prometheus metric registration
107 and recording.
108 """
109
@@ -127,8 +122,7 @@ class ECConnectorPromMetrics:
122 self.per_engine_labelvalues = per_engine_labelvalues
123
124 def observe(self, transfer_stats_data: dict[str, Any], engine_idx: int = 0):
130 - """
131 - Record the supplied transfer statistics to Prometheus metrics. These
125 + """Record the supplied transfer statistics to Prometheus metrics. These
126 statistics are engine-specific, and should be recorded to a metric
127 with the appropriate 'engine' label. These metric instances can be
128 created using the create_metric_per_engine() helper method.
@@ -137,8 +131,7 @@ class ECConnectorPromMetrics:
131
132
133 class ECConnectorProm:
140 - """
141 - Support for registering per-connector Prometheus metrics, and
134 + """Support for registering per-connector Prometheus metrics, and
135 recording transfer statistics to those metrics. Uses
136 ECConnectorBase.build_prom_metrics().
137 """