Skip to content

Commit 43c146c

Browse files
authored
[Misc] Clean up unnecessary E501 ignore (#26274)
Signed-off-by: Roger Wang <[email protected]>
1 parent 7c2ec0f commit 43c146c

File tree

8 files changed

+38
-38
lines changed

8 files changed

+38
-38
lines changed

vllm/benchmarks/datasets.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ def generate_token_sequence(
626626
# Decode, then re-encode and truncate to preserve token count invariants
627627
total_input_len = prefix_len + int(input_len)
628628
prompt, adjusted_token_sequence, token_mismatch = (
629-
gen_prompt_decode_to_target_len( # noqa: E501
629+
gen_prompt_decode_to_target_len(
630630
tokenizer=tokenizer,
631631
token_sequence=token_sequence,
632632
target_token_len=total_input_len,
@@ -2855,7 +2855,7 @@ def _generate_exact_length_tokens(target_length: int) -> list[int]:
28552855
for _ in range(prompts_per_prefix):
28562856
suffix_tokens, token_mistmatch = _generate_exact_length_tokens(
28572857
suffix_len
2858-
) # noqa: E501
2858+
)
28592859
token_mismatch_total += token_mistmatch
28602860
combined_tokens = prefix_tokens + suffix_tokens
28612861
prompt = tokenizer.decode(combined_tokens)

vllm/benchmarks/throughput.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,14 +459,14 @@ def validate_args(args):
459459
):
460460
assert args.backend == "vllm-chat", (
461461
f"{args.dataset_path} needs to use vllm-chat as the backend."
462-
) # noqa: E501
462+
)
463463
elif args.dataset_path in (
464464
InstructCoderDataset.SUPPORTED_DATASET_PATHS
465465
| AIMODataset.SUPPORTED_DATASET_PATHS
466466
):
467467
assert args.backend == "vllm", (
468468
f"{args.dataset_path} needs to use vllm as the backend."
469-
) # noqa: E501
469+
)
470470
else:
471471
raise ValueError(f"{args.dataset_path} is not supported by hf dataset.")
472472

vllm/compilation/inductor_pass.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from torch._inductor.custom_graph_pass import CustomGraphPass
2020
else:
2121
# CustomGraphPass is not present in 2.5 or lower, import our version
22-
from .torch25_custom_graph_pass import ( # noqa: E501
22+
from .torch25_custom_graph_pass import (
2323
Torch25CustomGraphPass as CustomGraphPass,
2424
)
2525

vllm/model_executor/layers/quantization/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def get_quantization_config(quantization: str) -> type[QuantizationConfig]:
9595
from .awq_marlin import AWQMarlinConfig
9696
from .bitblas import BitBLASConfig
9797
from .bitsandbytes import BitsAndBytesConfig
98-
from .compressed_tensors.compressed_tensors import ( # noqa: E501
98+
from .compressed_tensors.compressed_tensors import (
9999
CompressedTensorsConfig,
100100
)
101101
from .deepspeedfp import DeepSpeedFPConfig

vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
UnquantizedLinearMethod,
2727
)
2828
from vllm.model_executor.layers.quantization import QuantizationMethods
29-
from vllm.model_executor.layers.quantization.base_config import ( # noqa: E501
29+
from vllm.model_executor.layers.quantization.base_config import (
3030
QuantizationConfig,
3131
QuantizeMethodBase,
3232
)
@@ -256,7 +256,7 @@ def _quantization_scheme_map_from_config(
256256
)
257257
else:
258258
target_scheme_map[target]["input_activations"] = (
259-
QuantizationArgs.model_validate( # noqa: E501
259+
QuantizationArgs.model_validate(
260260
quant_config.get("input_activations")
261261
)
262262
)

vllm/model_executor/models/gemma3n_mm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def get_dummy_mm_data(
176176
processor = self.info.get_hf_processor()
177177
audio_feature_extractor: Gemma3nAudioFeatureExtractor = (
178178
processor.feature_extractor
179-
) # noqa: E501
179+
)
180180
audio_len = audio_feature_extractor.fft_length
181181
image_processor: SiglipImageProcessorFast = processor.image_processor
182182
img_width = image_processor.size.get("width", 224)

vllm/model_executor/models/registry.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
"JambaForCausalLM": ("jamba", "JambaForCausalLM"),
121121
"Lfm2ForCausalLM": ("lfm2", "Lfm2ForCausalLM"),
122122
"LlamaForCausalLM": ("llama", "LlamaForCausalLM"),
123-
"Llama4ForCausalLM": ("llama4", "Llama4ForCausalLM"), # noqa: E501
123+
"Llama4ForCausalLM": ("llama4", "Llama4ForCausalLM"),
124124
# For decapoda-research/llama-*
125125
"LLaMAForCausalLM": ("llama", "LlamaForCausalLM"),
126126
"LongcatFlashForCausalLM": ("longcat_flash", "LongcatFlashForCausalLM"),
@@ -204,7 +204,7 @@
204204
"LlavaNextForConditionalGeneration": (
205205
"llava_next",
206206
"LlavaNextForConditionalGeneration",
207-
), # noqa: E501
207+
),
208208
"Phi3VForCausalLM": ("phi3v", "Phi3VForCausalLM"),
209209
"Qwen2VLForConditionalGeneration": ("qwen2_vl", "Qwen2VLForConditionalGeneration"), # noqa: E501
210210
# Technically Terratorch models work on images, both in
@@ -240,46 +240,46 @@
240240
"AyaVisionForConditionalGeneration": (
241241
"aya_vision",
242242
"AyaVisionForConditionalGeneration",
243-
), # noqa: E501
243+
),
244244
"Blip2ForConditionalGeneration": ("blip2", "Blip2ForConditionalGeneration"),
245245
"ChameleonForConditionalGeneration": (
246246
"chameleon",
247247
"ChameleonForConditionalGeneration",
248-
), # noqa: E501
248+
),
249249
"Cohere2VisionForConditionalGeneration": (
250250
"cohere2_vision",
251251
"Cohere2VisionForConditionalGeneration",
252-
), # noqa: E501
252+
),
253253
"DeepseekVLV2ForCausalLM": ("deepseek_vl2", "DeepseekVLV2ForCausalLM"),
254254
"DotsOCRForCausalLM": ("dots_ocr", "DotsOCRForCausalLM"),
255255
"Ernie4_5_VLMoeForConditionalGeneration": (
256256
"ernie45_vl",
257257
"Ernie4_5_VLMoeForConditionalGeneration",
258-
), # noqa: E501
258+
),
259259
"FuyuForCausalLM": ("fuyu", "FuyuForCausalLM"),
260260
"Gemma3ForConditionalGeneration": ("gemma3_mm", "Gemma3ForConditionalGeneration"), # noqa: E501
261261
"Gemma3nForConditionalGeneration": (
262262
"gemma3n_mm",
263263
"Gemma3nForConditionalGeneration",
264-
), # noqa: E501
264+
),
265265
"GLM4VForCausalLM": ("glm4v", "GLM4VForCausalLM"),
266266
"Glm4vForConditionalGeneration": ("glm4_1v", "Glm4vForConditionalGeneration"), # noqa: E501
267267
"Glm4vMoeForConditionalGeneration": ("glm4_1v", "Glm4vMoeForConditionalGeneration"), # noqa: E501
268268
"GraniteSpeechForConditionalGeneration": (
269269
"granite_speech",
270270
"GraniteSpeechForConditionalGeneration",
271-
), # noqa: E501
271+
),
272272
"H2OVLChatModel": ("h2ovl", "H2OVLChatModel"),
273273
"InternVLChatModel": ("internvl", "InternVLChatModel"),
274274
"NemotronH_Nano_VL_V2": ("nano_nemotron_vl", "NemotronH_Nano_VL_V2"),
275275
"InternS1ForConditionalGeneration": (
276276
"interns1",
277277
"InternS1ForConditionalGeneration",
278-
), # noqa: E501
278+
),
279279
"InternVLForConditionalGeneration": (
280280
"interns1",
281281
"InternS1ForConditionalGeneration",
282-
), # noqa: E501
282+
),
283283
"Idefics3ForConditionalGeneration": (
284284
"idefics3",
285285
"Idefics3ForConditionalGeneration",
@@ -289,7 +289,7 @@
289289
"KeyeVL1_5ForConditionalGeneration": (
290290
"keye_vl1_5",
291291
"KeyeVL1_5ForConditionalGeneration",
292-
), # noqa: E501
292+
),
293293
"RForConditionalGeneration": ("rvl", "RForConditionalGeneration"),
294294
"KimiVLForConditionalGeneration": ("kimi_vl", "KimiVLForConditionalGeneration"), # noqa: E501
295295
"Llama_Nemotron_Nano_VL": ("nemotron_vl", "LlamaNemotronVLChatModel"),
@@ -298,35 +298,35 @@
298298
"LlavaNextForConditionalGeneration": (
299299
"llava_next",
300300
"LlavaNextForConditionalGeneration",
301-
), # noqa: E501
301+
),
302302
"LlavaNextVideoForConditionalGeneration": (
303303
"llava_next_video",
304304
"LlavaNextVideoForConditionalGeneration",
305-
), # noqa: E501
305+
),
306306
"LlavaOnevisionForConditionalGeneration": (
307307
"llava_onevision",
308308
"LlavaOnevisionForConditionalGeneration",
309-
), # noqa: E501
309+
),
310310
"MantisForConditionalGeneration": ("llava", "MantisForConditionalGeneration"), # noqa: E501
311311
"MiDashengLMModel": ("midashenglm", "MiDashengLMModel"),
312312
"MiniMaxVL01ForConditionalGeneration": (
313313
"minimax_vl_01",
314314
"MiniMaxVL01ForConditionalGeneration",
315-
), # noqa: E501
315+
),
316316
"MiniCPMO": ("minicpmo", "MiniCPMO"),
317317
"MiniCPMV": ("minicpmv", "MiniCPMV"),
318318
"Mistral3ForConditionalGeneration": (
319319
"mistral3",
320320
"Mistral3ForConditionalGeneration",
321-
), # noqa: E501
321+
),
322322
"MolmoForCausalLM": ("molmo", "MolmoForCausalLM"),
323323
"NVLM_D": ("nvlm_d", "NVLM_D_Model"),
324324
"Ovis": ("ovis", "Ovis"),
325325
"Ovis2_5": ("ovis2_5", "Ovis2_5"),
326326
"PaliGemmaForConditionalGeneration": (
327327
"paligemma",
328328
"PaliGemmaForConditionalGeneration",
329-
), # noqa: E501
329+
),
330330
"Phi3VForCausalLM": ("phi3v", "Phi3VForCausalLM"),
331331
"Phi4MMForCausalLM": ("phi4mm", "Phi4MMForCausalLM"),
332332
"Phi4MultimodalForCausalLM": ("phi4_multimodal", "Phi4MultimodalForCausalLM"), # noqa: E501
@@ -336,31 +336,31 @@
336336
"Qwen2_5_VLForConditionalGeneration": (
337337
"qwen2_5_vl",
338338
"Qwen2_5_VLForConditionalGeneration",
339-
), # noqa: E501
339+
),
340340
"Qwen2AudioForConditionalGeneration": (
341341
"qwen2_audio",
342342
"Qwen2AudioForConditionalGeneration",
343-
), # noqa: E501
343+
),
344344
"Qwen2_5OmniModel": (
345345
"qwen2_5_omni_thinker",
346346
"Qwen2_5OmniThinkerForConditionalGeneration",
347-
), # noqa: E501
347+
),
348348
"Qwen2_5OmniForConditionalGeneration": (
349349
"qwen2_5_omni_thinker",
350350
"Qwen2_5OmniThinkerForConditionalGeneration",
351-
), # noqa: E501
351+
),
352352
"Qwen3VLForConditionalGeneration": ("qwen3_vl", "Qwen3VLForConditionalGeneration"), # noqa: E501
353353
"Qwen3VLMoeForConditionalGeneration": (
354354
"qwen3_vl_moe",
355355
"Qwen3VLMoeForConditionalGeneration",
356-
), # noqa: E501
356+
),
357357
"SkyworkR1VChatModel": ("skyworkr1v", "SkyworkR1VChatModel"),
358358
"Step3VLForConditionalGeneration": ("step3_vl", "Step3VLForConditionalGeneration"), # noqa: E501
359359
"TarsierForConditionalGeneration": ("tarsier", "TarsierForConditionalGeneration"), # noqa: E501
360360
"Tarsier2ForConditionalGeneration": (
361361
"qwen2_vl",
362362
"Tarsier2ForConditionalGeneration",
363-
), # noqa: E501
363+
),
364364
"UltravoxModel": ("ultravox", "UltravoxModel"),
365365
"VoxtralForConditionalGeneration": ("voxtral", "VoxtralForConditionalGeneration"), # noqa: E501
366366
# [Encoder-decoder]
@@ -401,23 +401,23 @@
401401
"TransformersMoEForMultimodalLM": (
402402
"transformers_moe",
403403
"TransformersMoEForMultimodalLM",
404-
), # noqa: E501
404+
),
405405
"TransformersEmbeddingModel": (
406406
"transformers_pooling",
407407
"TransformersEmbeddingModel",
408-
), # noqa: E501
408+
),
409409
"TransformersForSequenceClassification": (
410410
"transformers_pooling",
411411
"TransformersForSequenceClassification",
412-
), # noqa: E501
412+
),
413413
"TransformersMoEForSequenceClassification": (
414414
"transformers_pooling",
415415
"TransformersMoEForSequenceClassification",
416-
), # noqa: E501
416+
),
417417
"TransformersMoEEmbeddingModel": (
418418
"transformers_pooling",
419419
"TransformersMoEEmbeddingModel",
420-
), # noqa: E501
420+
),
421421
}
422422

423423
_VLLM_MODELS = {

vllm/v1/attention/backends/gdn_attn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def __init__(
7979
self.speculative_config = vllm_config.speculative_config
8080
self.kv_cache_spec = kv_cache_spec
8181
if self.speculative_config:
82-
self.num_spec = self.speculative_config.num_speculative_tokens # noqa: E501
82+
self.num_spec = self.speculative_config.num_speculative_tokens
8383
else:
8484
self.num_spec = 0
8585
self.use_spec_decode = self.num_spec > 0

0 commit comments

Comments
 (0)