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

Unified Diff: common/py_utils/py_utils/discover.py

Issue 2941123002: [Telemetry] Move discover to common/py_utils (Closed)
Patch Set: fix imports Created 3 years, 6 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
« no previous file with comments | « no previous file | common/py_utils/py_utils/discover_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/py_utils/py_utils/discover.py
diff --git a/telemetry/telemetry/core/discover.py b/common/py_utils/py_utils/discover.py
similarity index 96%
copy from telemetry/telemetry/core/discover.py
copy to common/py_utils/py_utils/discover.py
index 7e7e4306ef33c717d0ec88cf14c98761f8ce4c22..a79581795be9ddcb21af480b3f393f6f231bb975 100644
--- a/telemetry/telemetry/core/discover.py
+++ b/common/py_utils/py_utils/discover.py
@@ -157,8 +157,8 @@ def DiscoverClassesInModule(module,
if not directly_constructable or IsDirectlyConstructable(obj):
if key_name in classes and index_by_class_name:
assert classes[key_name] is obj, (
- 'Duplicate key_name with different objs detected: '
- 'key=%s, obj1=%s, obj2=%s' % (key_name, classes[key_name], obj))
+ 'Duplicate key_name with different objs detected: '
+ 'key=%s, obj1=%s, obj2=%s' % (key_name, classes[key_name], obj))
else:
classes[key_name] = obj
@@ -182,9 +182,9 @@ def IsDirectlyConstructable(cls):
return len(args) == len(defaults) + 1
-_counter = [0]
+_COUNTER = [0]
def _GetUniqueModuleName():
- _counter[0] += 1
- return "module_" + str(_counter[0])
+ _COUNTER[0] += 1
+ return "module_" + str(_COUNTER[0])
« no previous file with comments | « no previous file | common/py_utils/py_utils/discover_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698