From 82169b3afc2903a183c2922f87b5306123f6b5db Mon Sep 17 00:00:00 2001 From: Sebastian Serth Date: Sat, 14 Nov 2020 00:04:23 +0100 Subject: [PATCH] Exclude keys from syntax error --- lib/py_lint_adapter.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/py_lint_adapter.rb b/lib/py_lint_adapter.rb index 1a35b382..1ec0c1b1 100644 --- a/lib/py_lint_adapter.rb +++ b/lib/py_lint_adapter.rb @@ -89,8 +89,13 @@ class PyLintAdapter < TestingFrameworkAdapter keys = key.split('.') final_key = keys.pop if %w[severity_name name regex replacement].exclude? final_key - keys.pop # second last key, e.g. #{key} - log_missing = I18n.t(keys.append('log_missing').join('.'), locale: :de, default: true) + second_final = keys.pop # second last key, e.g. #{key} + # Check for known values from SyntaxError + log_missing = if %w[actual suggestion context line].exclude? second_final + I18n.t(keys.append('log_missing').join('.'), locale: :de, default: true) + else + false + end else log_missing = true end