Skip to content

Refactor arithmetic_analysis/newton_raphson to not use eval #8863

Closed
@CaedenPH

Description

@CaedenPH

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting triageAwaiting triage from a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions