Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed Unnecessary Assignment for 'error' Var #920

Merged
merged 1 commit into from
Jul 7, 2019
Merged

Removed Unnecessary Assignment for 'error' Var #920

merged 1 commit into from
Jul 7, 2019

Conversation

PatOnTheBack
Copy link
Contributor

error = abs(f(a)) was declared on line 24 and line 32. It is unnecessary to have in both places.
I removed the second instance since it wastes resources to keep redefining the variable inside the for loop.
This fixes an issue found by lgtm

`error = abs(f(a))` was declared on line 24 and line 32. It is unnecessary to have in both places.
I removed the second instance since it wastes resources to keep redefining the variable inside the for loop.
This fixes an [issue found by lgtm](https://lgtm.com/projects/g/TheAlgorithms/Python/snapshot/66c4afbd0f28f9989f35ddbeb5c9263390c5d192/files/maths/newton_raphson.py?sort=name&dir=ASC&mode=heatmap)
Copy link
Member

@poyea poyea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your pull request!🤩

@poyea poyea merged commit 2b36528 into TheAlgorithms:master Jul 7, 2019
@cclauss
Copy link
Member

cclauss commented Jul 7, 2019

@PatOnTheBack if you add F4 to the flake8 tests in .travis.yml, you will find other import-related issues to fix. Thanks for your attention to these details.

@TheAlgorithms TheAlgorithms deleted a comment Jul 7, 2019
@TheAlgorithms TheAlgorithms deleted a comment Jul 7, 2019
stokhos pushed a commit to stokhos/Python that referenced this pull request Jan 3, 2021
`error = abs(f(a))` was declared on line 24 and line 32. It is unnecessary to have in both places.
I removed the second instance since it wastes resources to keep redefining the variable inside the for loop.
This fixes an [issue found by lgtm](https://lgtm.com/projects/g/TheAlgorithms/Python/snapshot/66c4afbd0f28f9989f35ddbeb5c9263390c5d192/files/maths/newton_raphson.py?sort=name&dir=ASC&mode=heatmap)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants