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

Unified Diff: tools/telemetry/telemetry/internal/util/classes.py

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: tools/telemetry/telemetry/internal/util/classes.py
diff --git a/tools/telemetry/telemetry/internal/util/classes.py b/tools/telemetry/telemetry/internal/util/classes.py
deleted file mode 100644
index 0f90a06895fd572c4437f6bc58f7f768ba0a6e9b..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/internal/util/classes.py
+++ /dev/null
@@ -1,22 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import inspect
-
-
-def IsDirectlyConstructable(cls):
- """Returns True if instance of |cls| can be construct without arguments."""
- assert inspect.isclass(cls)
- if not hasattr(cls, '__init__'):
- # Case |class A: pass|.
- return True
- if cls.__init__ is object.__init__:
- # Case |class A(object): pass|.
- return True
- # Case |class (object):| with |__init__| other than |object.__init__|.
- args, _, _, defaults = inspect.getargspec(cls.__init__)
- if defaults is None:
- defaults = ()
- # Return true if |self| is only arg without a default.
- return len(args) == len(defaults) + 1

Powered by Google App Engine
This is Rietveld 408576698