From 295752ff3e4d155ff79e87b71d9b245326e8cccd Mon Sep 17 00:00:00 2001 From: w0rp Date: Wed, 13 Aug 2025 12:18:54 +0100 Subject: [PATCH] Skip empty or unparseable ruff items --- ale_linters/python/ruff.vim | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ale_linters/python/ruff.vim b/ale_linters/python/ruff.vim index e6fbda2a..9eba0936 100644 --- a/ale_linters/python/ruff.vim +++ b/ale_linters/python/ruff.vim @@ -76,6 +76,10 @@ function! ale_linters#python#ruff#Handle(buffer, lines) abort continue endtry + if empty(l:item) + continue + endif + if (l:item.code is# 'W291' || l:item.code is# 'W293') \&& !ale#Var(a:buffer, 'warn_about_trailing_whitespace') " Skip warnings for trailing whitespace if the option is off.