You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: arithmetic_analysis/newton_raphson.py:28:3[5](https://github.com/TheAlgorithms/Python/actions/runs/5515973175/jobs/10056851168?pr=8861#step:4:6): S307 Use of possibly insecure function; consider using `ast.literal_eval`
Error: arithmetic_analysis/newton_raphson.py:28:57: S307 Use of possibly insecure function; consider using `ast.literal_eval`
Error: arithmetic_analysis/newton_raphson.py:30:1[6](https://github.com/TheAlgorithms/Python/actions/runs/5515973175/jobs/10056851168?pr=8861#step:4:7): S307 Use of possibly insecure function; consider using `ast.literal_eval
The text was updated successfully, but these errors were encountered:
I tried using ast.literal_eval() but getting error, as all doctest failed
ValueError: malformed node or string on line 1: <ast.Call object at 0x00000240A44AC280>
after some search I came to know that the ast.literal_eval function is designed to evaluate Python literals or valid Python expressions, but it cannot directly handle mathematical functions or expressions involving variables like x.
What would you like to share?
https://github.com/TheAlgorithms/Python/blob/master/arithmetic_analysis/newton_raphson.py#L28
The newton raphson function uses eval, which is flagged by ruff here
https://github.com/TheAlgorithms/Python/actions/runs/5515973175/jobs/10056851168?pr=8861
Additional information
The text was updated successfully, but these errors were encountered: