mlco2 / codecarbon

Track emissions from Compute and recommend ways to reduce their impact on the environment.
https://mlco2.github.io/codecarbon
MIT License
1k stars 157 forks source link

Fixed name redefining of backup function #499

Closed MyGodItsFull0fStars closed 4 months ago

MyGodItsFull0fStars commented 4 months ago

Variable in the inner scope of the backup function was also called backup and did redefine the name within the scope.

I changed the variable name to backup_path as it is the result of parent / file_name.

This change is proposed to omit the linter error: Redefining name 'backup' from outer scope (line 48)Pylint[W0621:redefined-outer-name](https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/redefined-outer-name.html)

MyGodItsFull0fStars commented 4 months ago

You're welcome!