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

Unified Diff: build/android/pylib/perf/surface_stats_collector.py

Issue 727543003: [Android] Fix new pylint errors in build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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
« no previous file with comments | « build/android/pylib/linker/test_runner.py ('k') | build/android/pylib/uiautomator/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/perf/surface_stats_collector.py
diff --git a/build/android/pylib/perf/surface_stats_collector.py b/build/android/pylib/perf/surface_stats_collector.py
index a34d87d144bca82e0f9d140700240f8fdc667fb5..499b0c6fd25bad3fdb3e8a89a227097654e56d5f 100644
--- a/build/android/pylib/perf/surface_stats_collector.py
+++ b/build/android/pylib/perf/surface_stats_collector.py
@@ -13,7 +13,7 @@ from pylib.device import device_utils
# Log marker containing SurfaceTexture timestamps.
_SURFACE_TEXTURE_TIMESTAMPS_MESSAGE = 'SurfaceTexture update timestamps'
-_SURFACE_TEXTURE_TIMESTAMP_RE = '\d+'
+_SURFACE_TEXTURE_TIMESTAMP_RE = r'\d+'
_MIN_NORMALIZED_FRAME_LENGTH = 0.5
@@ -90,8 +90,8 @@ class SurfaceStatsCollector(object):
def _GetNormalizedDeltas(data, refresh_period, min_normalized_delta=None):
deltas = [t2 - t1 for t1, t2 in zip(data, data[1:])]
if min_normalized_delta != None:
- deltas = filter(lambda d: d / refresh_period >= min_normalized_delta,
- deltas)
+ deltas = [d for d in deltas
+ if d / refresh_period >= min_normalized_delta]
return (deltas, [delta / refresh_period for delta in deltas])
@staticmethod
@@ -297,7 +297,7 @@ class SurfaceStatsCollector(object):
"""
results = self._device.RunShellCommand('service call SurfaceFlinger 1013')
assert len(results) == 1
- match = re.search('^Result: Parcel\((\w+)', results[0])
+ match = re.search(r'^Result: Parcel\((\w+)', results[0])
cur_surface = 0
if match:
try:
« no previous file with comments | « build/android/pylib/linker/test_runner.py ('k') | build/android/pylib/uiautomator/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698