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

Side by Side Diff: tools/telemetry/telemetry/web_components/web_components_project.py

Issue 445793004: Fix import order with isort tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 6
7
8 from telemetry.core import util 7 from telemetry.core import util
9 from trace_viewer import trace_viewer_project 8 from trace_viewer import trace_viewer_project
10 9
10
11 def _FindAllFilesRecursive(source_paths, pred): 11 def _FindAllFilesRecursive(source_paths, pred):
12 all_filenames = set() 12 all_filenames = set()
13 for source_path in source_paths: 13 for source_path in source_paths:
14 for dirpath, _, filenames in os.walk(source_path): 14 for dirpath, _, filenames in os.walk(source_path):
15 for f in filenames: 15 for f in filenames:
16 if f.startswith('.'): 16 if f.startswith('.'):
17 continue 17 continue
18 x = os.path.abspath(os.path.join(dirpath, f)) 18 x = os.path.abspath(os.path.join(dirpath, f))
19 if pred(x): 19 if pred(x):
20 all_filenames.add(x) 20 all_filenames.add(x)
(...skipping 10 matching lines...) Expand all
31 os.path.join(self.telemetry_path, 'unittest_data'), 31 os.path.join(self.telemetry_path, 'unittest_data'),
32 os.path.join(self.telemetry_path, 'support')] 32 os.path.join(self.telemetry_path, 'support')]
33 excluded_html_files = _FindAllFilesRecursive( 33 excluded_html_files = _FindAllFilesRecursive(
34 exclude_paths, 34 exclude_paths,
35 lambda x: x.endswith('.html')) 35 lambda x: x.endswith('.html'))
36 36
37 self.non_module_html_files.extend(excluded_html_files) 37 self.non_module_html_files.extend(excluded_html_files)
38 self.non_module_html_files.appendRel(self.telemetry_path, 'results.html') 38 self.non_module_html_files.appendRel(self.telemetry_path, 'results.html')
39 39
40 self.source_paths.append(self.telemetry_path) 40 self.source_paths.append(self.telemetry_path)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698