[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [sbws/master] Fix linter errors
commit 78706632ce71693911f09dfd72ecedcd5fa782e9
Author: juga0 <juga@xxxxxxxxxx>
Date: Thu Sep 13 17:28:57 2018 +0000
Fix linter errors
---
sbws/lib/v3bwfile.py | 11 +++++------
tests/unit/lib/test_v3bwfile.py | 2 +-
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/sbws/lib/v3bwfile.py b/sbws/lib/v3bwfile.py
index 4756e5e..34866e9 100644
--- a/sbws/lib/v3bwfile.py
+++ b/sbws/lib/v3bwfile.py
@@ -9,9 +9,8 @@ from statistics import median, mean
from sbws import __version__
from sbws.globals import (SPEC_VERSION, BW_LINE_SIZE, SBWS_SCALE_CONSTANT,
- TORFLOW_SCALING, SBWS_SCALING, TORFLOW_BW_MARGIN,
- TORFLOW_OBS_LAST, TORFLOW_OBS_MEAN,
- fail_hard)
+ SBWS_SCALING, TORFLOW_BW_MARGIN, TORFLOW_SCALING,
+ TORFLOW_OBS_LAST, TORFLOW_OBS_MEAN)
from sbws.lib.resultdump import ResultSuccess, _ResultType
from sbws.util.filelock import DirectoryLock
from sbws.util.timestamp import now_isodt_str, unixts_to_isodt_str
@@ -412,9 +411,9 @@ class V3BWFile(object):
header = V3BWHeader.from_results(results, state_fpath)
bw_lines_raw = []
for fp in results.keys():
- l = V3BWLine.from_results(results[fp])
- if l is not None:
- bw_lines_raw.append(l)
+ line = V3BWLine.from_results(results[fp])
+ if line is not None:
+ bw_lines_raw.append(line)
if not bw_lines_raw:
return cls(header, [])
if scaling_method == SBWS_SCALING:
diff --git a/tests/unit/lib/test_v3bwfile.py b/tests/unit/lib/test_v3bwfile.py
index 15b148a..aed989f 100644
--- a/tests/unit/lib/test_v3bwfile.py
+++ b/tests/unit/lib/test_v3bwfile.py
@@ -4,7 +4,7 @@ import json
import os.path
from sbws import __version__ as version
-from sbws.globals import SPEC_VERSION, SBWS_SCALING, TORFLOW_SCALING
+from sbws.globals import SPEC_VERSION, SBWS_SCALING
from sbws.lib.resultdump import Result, load_result_file
from sbws.lib.v3bwfile import (V3BWHeader, V3BWLine, TERMINATOR, LINE_SEP,
KEYVALUE_SEP_V110, num_results_of_type,
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits