From 8c12ff59f1a5e750151f5eb0e806dcc80e91c3c2 Mon Sep 17 00:00:00 2001 From: Matej Klotton Date: Thu, 24 Mar 2016 16:14:20 +0100 Subject: Reformat python libraries. PEP8 reformat fix typos docstrings reformat Change-Id: Ic48ba4e06490630808b8e2ab1ab0b046ec7eeed7 Signed-off-by: Matej Klotton --- resources/libraries/python/DropRateSearch.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'resources/libraries/python/DropRateSearch.py') diff --git a/resources/libraries/python/DropRateSearch.py b/resources/libraries/python/DropRateSearch.py index c25f34fcf6..ceaebd57c3 100644 --- a/resources/libraries/python/DropRateSearch.py +++ b/resources/libraries/python/DropRateSearch.py @@ -320,14 +320,13 @@ class DropRateSearch(object): else: raise ValueError("Unknown search result type") - def linear_search(self, start_rate, traffic_type): """Linear search of rate with loss below acceptance criteria. :param start_rate: Initial rate. :param traffic_type: Traffic profile. :type start_rate: float - :param traffic_type: str + :type traffic_type: str :return: nothing """ @@ -350,7 +349,7 @@ class DropRateSearch(object): res = self._get_res_based_on_search_type(res) if self._search_linear_direction == SearchDirection.BOTTOM_UP: - # loss occured and it was above acceptance criteria + # loss occurred and it was above acceptance criteria if not res: # if this is first run then we didn't find drop rate if prev_rate is None: @@ -381,7 +380,7 @@ class DropRateSearch(object): raise RuntimeError("Unknown search result") elif self._search_linear_direction == SearchDirection.TOP_DOWN: - # loss occured, decrease rate + # loss occurred, decrease rate if not res: prev_rate = rate rate -= self._rate_linear_step @@ -464,7 +463,7 @@ class DropRateSearch(object): res = self._get_res_based_on_search_type(res) - # loss occured and it was above acceptance criteria + # loss occurred and it was above acceptance criteria if not res: self.binary_search(b_min, rate, traffic_type) # there was no loss / loss below acceptance criteria -- cgit 1.2.3-korg