Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Commit

Permalink
Combine comment and docstring
Browse files Browse the repository at this point in the history
No need to have the comment and the docstring so combined them.

Co-authored-by: cduhn17 <87447403+cduhn17@users.noreply.github.com>
  • Loading branch information
aloftus23 and cduhn17 committed Dec 22, 2021
1 parent dcccb11 commit 12b6c06
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pe_reports/charts.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ def pie(self):

# Only show the label when the value is greater than 10%.
def autopct(pct):
"""Get percentages for the pie chart slices."""
"""Get percentages for the pie chart slices and only
show the label when the value is greater than 10%.
"""
return ("%1.0f%%" % pct) if pct > 1 else ""

pie = plt.pie(
Expand Down

0 comments on commit 12b6c06

Please sign in to comment.