hedyhli / starcli

:sparkles: Browse trending GitHub projects from your command line
https://pypi.org/project/starcli/
MIT License
550 stars 50 forks source link

Added number shortening #42

Closed shivam212 closed 4 years ago

shivam212 commented 4 years ago

Description

Added a number shortening function as needed, works with a newly added --long-stats flag.

Context

Adds the enhancement as in issue #40 .

More details Rounding up and if the value after rounding up is more than 1000, it's shortened.

Remember that your code will be checked by the black formatter, pylint, codespell, and pytest.

hedyhli commented 4 years ago

Thanks, I’m a bit busy at the moment, will get back you later

hedyhli commented 4 years ago

Oh meanwhile, would you mind adding a test for the shorten number function? Just add a test_shorten_number file and add a function named the same in the file, import the function and throw it some dummy numbers and make it shorten the number, use the assert keyword. You can check out test_search file for reference if you're stuck.

Then you can see if the test passes by running python -m pytest on the terminal

shivam212 commented 4 years ago

Will do!

shivam212 commented 4 years ago

@hedythedev done!

hedyhli commented 4 years ago

Everything looks good, I've just fixed formatting and the 6.0k to 6k things. Should be ready to merge, thanks for the contribution @shivam212! If you have anything else to add, you can do so

hedyhli commented 4 years ago

@all-contributors please add @shivam212 for code

allcontributors[bot] commented 4 years ago

@hedythedev

I've put up a pull request to add @shivam212! :tada: