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

Draft: Fixed wrong return type hint and updated doc string #511

Open MyGodItsFull0fStars opened 3 months ago

MyGodItsFull0fStars commented 3 months ago

Hi, I made some changes to the stop_task(...) function of the BaseEmissionTracker class.

I changed the return type from float to the actual return type EmissionsData. This was probably an oversight, as in almost every other function the return type is a float.

I also changed the return type in the doc-string from None to the actual one.

benoit-cty commented 3 months ago

Hello, Thanks, I think it's a good idea. It's a breaking change so it needs to be put in a major release, and do the same things on all methods.

MyGodItsFull0fStars commented 3 months ago

Hello, okay, when I have time I can add more of these changes to this branch, which can later be merged for a major release.

Thanks for letting me know :)