Skip to content

Commit

Permalink
Update hover.py
Browse files Browse the repository at this point in the history
fix pylint
  • Loading branch information
ruppde authored and MatejKastak committed Oct 23, 2023
1 parent 2817d91 commit 8a0b9e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion yls/hover.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8a0b9e7

Please sign in to comment.