From 2e3e4d4d77f5761c36881b2bd32fd1922c6dfc39 Mon Sep 17 00:00:00 2001 From: Egor Kostan <20955183+ikostan@users.noreply.github.com> Date: Fri, 13 Dec 2024 09:58:10 -0800 Subject: [PATCH] Update compute_ranks.py kyu_5/sports_league_table_ranking/compute_ranks.py:132 in public function `calc_gd`: D401: First line should be in imperative mood (perhaps 'Calculate', not 'Calculates') [Docstring] prescribes the function or method's effect as a command: ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...". kyu_5/sports_league_table_ranking/compute_ranks.py:144 in public function `calc_rank`: D401: First line should be in imperative mood (perhaps 'Calculate', not 'Calculates') [Docstring] prescribes the function or method's effect as a command: ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...". --- kyu_5/sports_league_table_ranking/compute_ranks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kyu_5/sports_league_table_ranking/compute_ranks.py b/kyu_5/sports_league_table_ranking/compute_ranks.py index 0ee07c8f9df..7b0e698e7f4 100644 --- a/kyu_5/sports_league_table_ranking/compute_ranks.py +++ b/kyu_5/sports_league_table_ranking/compute_ranks.py @@ -130,7 +130,7 @@ def calc_for_against(teams, team, team_1, team_2) -> None: def calc_gd(teams) -> None: """ - Calculates "GD". + Calculate "GD". :param teams: :return: @@ -142,7 +142,7 @@ def calc_gd(teams) -> None: def calc_rank(teams: dict) -> None: """ - Calculates Rank. + Calculate Rank. First you sort the teams by their points. If two or more teams reached the same number of points, the second criteria