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

use % formatter #273

Merged
merged 2 commits into from
Apr 10, 2016
Merged

use % formatter #273

merged 2 commits into from
Apr 10, 2016

Conversation

EdwardBetts
Copy link
Contributor

No description provided.

@henryiii
Copy link
Collaborator

Thanks, I'll see if I can merge this as soon as I fix the Travis builds. Unfortunately, there's an unstable test (the nohup one) that causes the builds to sporadically fail (I think).

@@ -139,16 +139,16 @@ def __str__(self):
if width - len(ending) < 10 or self.has_output:
self.width = 0
if self.timer:
return "{0:g}% complete: {1}".format(100*percent, self.str_time_remaining())
return "{0:%} complete: {1}".format(percent, self.str_time_remaining())
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is slightly different, this returns 0.000000% instead of 0% (etc), it should be: {0:.0%} to be more reasonable.

@henryiii
Copy link
Collaborator

Yep, the % formatter is in the Py 2.6 docs, so it can be merged. I had one comment, though, can you fix that first?

(Commented in files changed line view)

@EdwardBetts
Copy link
Contributor Author

I made the extra change.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 80.162% when pulling 6ac5ce3 on EdwardBetts:patch-1 into 6c25f85 on tomerfiliba:master.

@henryiii henryiii merged commit 097bbe3 into tomerfiliba:master Apr 10, 2016
@EdwardBetts EdwardBetts deleted the patch-1 branch April 11, 2016 03:32
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