Disable mypy arg-type and assignment checks in tests (#59428)
Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
17e9295dd5
commit
fc2c801ad9
@@ -340,7 +340,7 @@ def _make_v2_state(
|
||||
device=device,
|
||||
all_token_ids=SimpleNamespace(gpu=all_tokens),
|
||||
)
|
||||
state = DryState(_make_vllm_config(), req_states) # type: ignore[arg-type]
|
||||
state = DryState(_make_vllm_config(), req_states)
|
||||
if tokenizer is not None:
|
||||
# Re-resolve the default set now that a tokenizer is installed.
|
||||
state._tokenizer = tokenizer
|
||||
@@ -446,7 +446,7 @@ def test_spec_decode_is_refused_at_construction():
|
||||
)
|
||||
config = _make_vllm_config(speculative_config=SimpleNamespace())
|
||||
with pytest.raises(ValueError, match="speculative decoding"):
|
||||
DryState(config, req_states) # type: ignore[arg-type]
|
||||
DryState(config, req_states)
|
||||
|
||||
|
||||
def test_v2_draft_expanded_logits_raise():
|
||||
@@ -918,7 +918,7 @@ def test_loads_through_the_loader_by_fqcn():
|
||||
)
|
||||
procs = loader.build_custom_logits_processors(
|
||||
_make_vllm_config(),
|
||||
req_states, # type: ignore[arg-type]
|
||||
req_states,
|
||||
False,
|
||||
[DRY_FQCN],
|
||||
)
|
||||
|
||||
@@ -486,12 +486,12 @@ def test_prompt_logprob_token_ids_require_v2_model_runner():
|
||||
params = SamplingParams(prompt_logprob_token_ids=[1, 2])
|
||||
with patch.object(SamplingParams, "verify"):
|
||||
with pytest.raises(VLLMValidationError, match="V2 model runner"):
|
||||
InputProcessor._validate_params(processor, params, ("generate",)) # type: ignore[arg-type]
|
||||
InputProcessor._validate_params(processor, params, ("generate",))
|
||||
processor.vllm_config.use_v2_model_runner = True
|
||||
InputProcessor._validate_params(processor, params, ("generate",)) # type: ignore[arg-type]
|
||||
InputProcessor._validate_params(processor, params, ("generate",))
|
||||
processor.vllm_config.cache_config.kv_sharing_fast_prefill = True
|
||||
with pytest.raises(VLLMValidationError, match="fast-prefill"):
|
||||
InputProcessor._validate_params(processor, params, ("generate",)) # type: ignore[arg-type]
|
||||
InputProcessor._validate_params(processor, params, ("generate",))
|
||||
|
||||
|
||||
def test_none_logprobs(vllm_model, example_prompts):
|
||||
|
||||
@@ -105,7 +105,7 @@ def test_trace_decode_token_ids_rejects_speculative_decoding():
|
||||
with pytest.raises(ValueError, match="not supported with speculative decoding"):
|
||||
params._validate_trace_replay(
|
||||
_make_model_config(vocab_size=100),
|
||||
speculative_config=object(), # type: ignore[arg-type] # Only non-None presence is tested.
|
||||
speculative_config=object(),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user