From 8a0b9e7be16b2571362a84480b6f5e1341de6d7a Mon Sep 17 00:00:00 2001 From: Arnim Rupp <46819580+ruppde@users.noreply.github.com> Date: Mon, 9 Oct 2023 12:36:18 +0200 Subject: [PATCH] Update hover.py fix pylint --- yls/hover.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yls/hover.py b/yls/hover.py index 6297a44..f8e4e1d 100644 --- a/yls/hover.py +++ b/yls/hover.py @@ -64,7 +64,9 @@ async def hover(self, params: lsp_types.TextDocumentPositionParams) -> lsp_types ) log.debug(f'[HOVER] Hover request with token "{token}" and type "{token.type}"') - if token.type == yaramod.TokenType.StringId or token.type == yaramod.TokenType.StringIdAfterNewline: + if ( + token.type in (yaramod.TokenType.StringId, yaramod.TokenType.StringIdAfterNewline) + ): return await self.hover_string(token, document, position) elif token.type == yaramod.TokenType.Id: yara_file = utils.yaramod_parse_file(document.path)