[CI] Ignore ruff D209, rejoin the docstrings it split, and silence incompatible-rule warnings (#57212)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
1085b64425
commit
651a88c09a
@@ -398,8 +398,7 @@ def test_pynvvideocodec_unrelated_error_propagates(
|
||||
|
||||
class TestMergeKwargsGpuBackendPolicy:
|
||||
"""Verify that merge_kwargs blocks request-level GPU backend selection
|
||||
when the static (engine-level) config did not configure that backend.
|
||||
"""
|
||||
when the static (engine-level) config did not configure that backend."""
|
||||
|
||||
def test_pynvvideocodec_requires_gpu(self):
|
||||
assert VIDEO_LOADER_REGISTRY.backend_requires_gpu(PYNVVIDEOCODEC_VIDEO_BACKEND)
|
||||
@@ -492,8 +491,7 @@ class TestMergeKwargsGpuBackendPolicy:
|
||||
|
||||
def test_static_pynv_with_different_runtime_gpu_backend(self):
|
||||
"""If static sets pynv via video_backend but runtime tries to set it
|
||||
via the codec-level 'backend' key (without a static match), strip it.
|
||||
"""
|
||||
via the codec-level 'backend' key (without a static match), strip it."""
|
||||
result = VideoMediaIO.merge_kwargs(
|
||||
default_kwargs={"video_backend": "pynvvideocodec"},
|
||||
runtime_kwargs={"backend": "pynvvideocodec"},
|
||||
@@ -532,8 +530,7 @@ class TestMergeKwargsGpuBackendPolicy:
|
||||
def test_strips_request_level_device(self):
|
||||
"""The decode device is a startup-only knob: a request must not move
|
||||
decoding onto the GPU when the startup config did not opt in, nor off
|
||||
it when it did.
|
||||
"""
|
||||
it when it did."""
|
||||
result = VideoMediaIO.merge_kwargs(
|
||||
default_kwargs={"backend": "torchcodec"},
|
||||
runtime_kwargs={"device": "cuda"},
|
||||
@@ -558,8 +555,7 @@ class TestMergeKwargsGpuBackendPolicy:
|
||||
def test_switching_backend_drops_stale_codec_options(default_kwargs):
|
||||
"""Codec-specific options from the static config must not leak into a
|
||||
different codec backend selected per-request, where they would fail the
|
||||
new backend's option validation.
|
||||
"""
|
||||
new backend's option validation."""
|
||||
result = VideoMediaIO.merge_kwargs(
|
||||
default_kwargs={**default_kwargs, "num_frames": 8},
|
||||
runtime_kwargs={"backend": "opencv"},
|
||||
@@ -581,8 +577,7 @@ def test_pynvvc_frames_normalized_to_nhwc(layout: str):
|
||||
"""PyNvVideoCodec frame batches are normalized to NHWC regardless of the
|
||||
per-frame layout the decoder emits (it has varied across versions), so the
|
||||
HF video processors (which materialize a PIL image per frame) receive the
|
||||
same NHWC shape as every other video backend.
|
||||
"""
|
||||
same NHWC shape as every other video backend."""
|
||||
torch = pytest.importorskip("torch")
|
||||
|
||||
n, h, w, c = 4, 5, 6, 3
|
||||
|
||||
Reference in New Issue
Block a user