0

[Telemetry] Enable more lint checks for telemetry/.

BUG=475714

Review URL: https://codereview.chromium.org/1100233002

Cr-Commit-Position: refs/heads/master@{#326588}
This commit is contained in:
nednguyen
2015-04-23 11:32:22 -07:00
committed by Commit bot
parent ed28f845fc
commit 9de0d226b3
5 changed files with 9 additions and 10 deletions

@ -2,7 +2,7 @@
# Disable the message, report, category or checker with the given id(s).
# TODO(nednguyen): Remove unusued-argument and unused-import from this list.
disable=I0010,I0011,abstract-class-little-used,abstract-class-not-used,anomalous-backslash-in-string,bad-builtin,bad-context-manager,bad-continuation,bad-indentation,bad-str-strip-call,bad-whitespace,broad-except,cell-var-from-loop,deprecated-lambda,deprecated-module,duplicate-code,eval-used,exec-used,fixme,function-redefined,global-statement,import-error,interface-not-implemented,invalid-name,locally-enabled,logging-not-lazy,missing-docstring,missing-final-newline,no-init,no-member,no-name-in-module,no-self-use,no-self-use,not-callable,old-style-class,protected-access,reimported,star-args,super-on-old-class,superfluous-parens,too-few-public-methods,too-many-ancestors,too-many-arguments,too-many-branches,too-many-function-args,too-many-instance-attributes,too-many-lines,too-many-locals,too-many-public-methods,too-many-return-statements,too-many-statements,trailing-whitespace,unnecessary-semicolon,unpacking-non-sequence,useless-else-on-loop,unused-argument,unused-import
disable=I0010,I0011,abstract-class-little-used,abstract-class-not-used,anomalous-backslash-in-string,bad-builtin,bad-continuation,bad-indentation,bad-str-strip-call,bad-whitespace,broad-except,cell-var-from-loop,deprecated-lambda,deprecated-module,duplicate-code,fixme,global-statement,import-error,interface-not-implemented,invalid-name,locally-enabled,logging-not-lazy,missing-docstring,no-init,no-member,no-name-in-module,no-self-use,not-callable,old-style-class,protected-access,star-args,superfluous-parens,too-few-public-methods,too-many-ancestors,too-many-arguments,too-many-branches,too-many-function-args,too-many-instance-attributes,too-many-lines,too-many-locals,too-many-public-methods,too-many-return-statements,too-many-statements,unpacking-non-sequence,unused-argument,unused-import
[REPORTS]

@ -35,7 +35,7 @@ def _DownloadAndImportDAVClientModule():
global davclient
davclient_src = urllib.urlopen(_DAVCLIENT_URL).read()
davclient = imp.new_module('davclient')
exec davclient_src in davclient.__dict__
exec davclient_src in davclient.__dict__ # pylint: disable=exec-used
class DAVClientWrapper(object):
@ -116,7 +116,7 @@ def ListAllDepsPaths(deps_file):
while os.path.basename(chrome_root) != 'src':
chrome_root = os.path.abspath(os.path.join(chrome_root, os.pardir))
exec open(deps_file).read()
exec open(deps_file).read() # pylint: disable=exec-used
deps_paths = deps.keys()
@ -146,7 +146,7 @@ def DownloadDeps(destination_dir, url):
deps = {}
deps_includes = {}
exec urllib.urlopen(url).read()
exec urllib.urlopen(url).read() # pylint: disable=exec-used
for dst_path, src_path in deps.iteritems():
full_dst_path = os.path.join(destination_dir, dst_path)

@ -177,7 +177,7 @@ class ValueTest(TestBase):
d = v.AsDict()
self.assertEqual('foo', d['tir_label'])
def testAsDictWithoutDescription(self):
def testAsDictWithoutInteractionRecord(self):
v = ValueForAsDictTest(None, 'x', 'unit', important=False, description=None,
tir_label=None)
self.assertNotIn('tir_label', v.AsDict())

@ -8,7 +8,6 @@ from collections import namedtuple
from telemetry.page import page
from telemetry.results import page_test_results
from telemetry.web_perf.metrics import layout
from collections import namedtuple
from telemetry.web_perf import timeline_interaction_record
FakeEvent = namedtuple('Event', 'name, start, end')

@ -90,13 +90,13 @@ class SmoothnessMetricUnitTest(unittest.TestCase):
frame_times=[[10, 20], [30, 40, 50]])
avg_surface_fps, jank_count, max_frame_delay, frame_lengths = (
self.metric._ComputeSurfaceFlingerMetric(self.page, stats))
self.assertEquals(None, avg_surface_fps.values)
self.assertEquals(None, avg_surface_fps.value)
self.assertEquals(smoothness.NOT_ENOUGH_FRAMES_MESSAGE,
avg_surface_fps.none_value_reason)
self.assertEquals(None, jank_count.values)
self.assertEquals(None, jank_count.value)
self.assertEquals(smoothness.NOT_ENOUGH_FRAMES_MESSAGE,
jank_count.none_value_reason)
self.assertEquals(None, max_frame_delay.values)
self.assertEquals(None, max_frame_delay.value)
self.assertEquals(smoothness.NOT_ENOUGH_FRAMES_MESSAGE,
max_frame_delay.none_value_reason)
self.assertEquals(None, frame_lengths.values)
@ -206,7 +206,7 @@ class SmoothnessMetricUnitTest(unittest.TestCase):
self.assertEquals(30, mean_frame_time_value.value)
self.assertEquals(20, percentage_smooth_value.value)
def testComputeFrameTimeMetricWithNotEnoughFrames(self):
def testComputeFrameTimeMetricWithNotEnoughFrames2(self):
stats = _MockRenderingStats(
frame_timestamps=self.not_enough_frames_timestamps,
frame_times=[[10, 20], [30, 40, 50]])