D5086: churn: remove redundant int() and round()
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Sat Oct 13 13:48:06 UTC 2018
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Spotted by Mads when he reviewed https://phab.mercurial-scm.org/D5063. Thanks!
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5086
AFFECTED FILES
hgext/churn.py
CHANGE DETAILS
diff --git a/hgext/churn.py b/hgext/churn.py
--- a/hgext/churn.py
+++ b/hgext/churn.py
@@ -205,7 +205,7 @@
'*' * charnum(sum(count)))
def charnum(count):
- return int(round(count * width // maxcount))
+ return count * width // maxcount
for name, count in rate:
ui.write(format(name, count))
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list