Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3029)

Unified Diff: webrtc/tools/py_event_log_analyzer/misc.py

Issue 2812273002: Fix lint errors to enable stricter PyLint rules (Closed)
Patch Set: Rebased Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/tools/py_event_log_analyzer/misc.py
diff --git a/webrtc/tools/py_event_log_analyzer/misc.py b/webrtc/tools/py_event_log_analyzer/misc.py
index bd70b75caa0d970498def93c00b4d614e010c657..629497c0186949909e3e25bfe047c1892d56af00 100644
--- a/webrtc/tools/py_event_log_analyzer/misc.py
+++ b/webrtc/tools/py_event_log_analyzer/misc.py
@@ -14,7 +14,7 @@ import collections
import sys
-def count_reordered(sequence_numbers):
+def CountReordered(sequence_numbers):
"""Returns number of reordered indices.
A reordered index is an index `i` for which sequence_numbers[i] >=
@@ -25,7 +25,7 @@ def count_reordered(sequence_numbers):
s1 >= s2)
-def ssrc_normalized_size_table(data_points):
+def SsrcNormalizedSizeTable(data_points):
"""Counts proportion of data for every SSRC.
Args:
@@ -40,10 +40,10 @@ def ssrc_normalized_size_table(data_points):
mapping = collections.defaultdict(int)
for point in data_points:
mapping[point.ssrc] += point.size
- return normalize_counter(mapping)
+ return NormalizeCounter(mapping)
-def normalize_counter(counter):
+def NormalizeCounter(counter):
"""Returns a normalized version of the dictionary `counter`.
Does not modify `counter`.
@@ -56,14 +56,14 @@ def normalize_counter(counter):
return {key: counter[key] / total for key in counter}
-def unwrap(data, mod):
+def Unwrap(data, mod):
"""Returns `data` unwrapped modulo `mod`. Does not modify data.
Adds integer multiples of mod to all elements of data except the
first, such that all pairs of consecutive elements (a, b) satisfy
-mod / 2 <= b - a < mod / 2.
- E.g. unwrap([0, 1, 2, 0, 1, 2, 7, 8], 3) -> [0, 1, 2, 3,
+ E.g. Unwrap([0, 1, 2, 0, 1, 2, 7, 8], 3) -> [0, 1, 2, 3,
4, 5, 4, 5]
"""
lst = data[:]
@@ -73,7 +73,7 @@ def unwrap(data, mod):
return lst
-def ssrc_directions(data_points):
+def SsrcDirections(data_points):
ssrc_is_incoming = {}
for point in data_points:
ssrc_is_incoming[point.ssrc] = point.incoming
@@ -82,6 +82,6 @@ def ssrc_directions(data_points):
# Python 2/3-compatible input function
if sys.version_info[0] <= 2:
- get_input = raw_input
+ get_input = raw_input # pylint: disable=invalid-name
else:
- get_input = input
+ get_input = input # pylint: disable=invalid-name
« no previous file with comments | « webrtc/modules/video_coding/codecs/test/plot_webrtc_test_logs.py ('k') | webrtc/tools/py_event_log_analyzer/misc_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698