Skip to content

Commit

Permalink
refactor: order methods in BurnDownForecastableTaskAggregator
Browse files Browse the repository at this point in the history
  • Loading branch information
aricma committed Jan 27, 2024
1 parent c7b31f7 commit f8820b1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions business_logic/burn_down_forecastable_task_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ def aggregate(
date_started=self._get_earliest_date(items),
)

@staticmethod
def _get_all_story_points(tasks: List[BurnDownForecastableTask]) -> StoryPoints:
all_story_points: float = 0
for task in tasks:
all_story_points += task.story_points
return all_story_points

def _get_earliest_date(self, tasks: List[BurnDownForecastableTask]) -> Date:
if len(tasks) == 0:
return self._make_fallback_date()
Expand All @@ -38,6 +31,13 @@ def _get_earliest_date(self, tasks: List[BurnDownForecastableTask]) -> Date:
earliest_date = task.date_started
return earliest_date

@staticmethod
def _get_all_story_points(tasks: List[BurnDownForecastableTask]) -> StoryPoints:
all_story_points: float = 0
for task in tasks:
all_story_points += task.story_points
return all_story_points

@staticmethod
def _make_fallback_date() -> Date:
return Date.today()

0 comments on commit f8820b1

Please sign in to comment.