Skip to content

Commit

Permalink
🔒 Remove eval()
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Nov 29, 2023
1 parent 01675e5 commit 6de00d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/termux_language_server/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def from_string_node(cls, node: Node, parent: "Trie | None") -> "Trie":
text = UNI.node2text(node)
_range = UNI.node2range(node)
if node.type in {"string", "raw_string"} and node.children != 3:
text = eval(text) # nosec: B307
text = text.strip("'\"")
_range.start.character += 1
_range.end.character -= 1
return cls(_range, parent, text)
Expand Down

0 comments on commit 6de00d2

Please sign in to comment.