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)