FIX: Avoid shadowing outer variable - #130
Conversation
Avoid shadowing outer variable. Fixes: ``` Shadows name 'data' from outer scope ```
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #130 +/- ##
=======================================
Coverage 63.57% 63.57%
=======================================
Files 12 12
Lines 2570 2570
=======================================
Hits 1634 1634
Misses 936 936
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Sorry, where is that being raised? Is that a warning? Should we put in a more rigorous check that it doesn't come back? |
IDE. Pycharm in this case.
Yes. Most of the times Python deals with these correctly, and does not result in bugs. But I guess depending on the circumstances, this could result in unexpected behavior.
I do not know how to add a check for this out of the top of my head. Whatever IDE you use, it will probably find a long list of warnings that linters are not finding. |
|
I don't mind this change, but I think your IDE might be catching something that isn't in the outer scope for this variable, but simply in another function. Nevertheless, this is innocuous, so merging. |
The IDE complains because the function where the private function resides is already using a |
|
Ah yes, I see it now. Objection retracted. |
Avoid shadowing outer variable. Fixes: