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

Unified Diff: chrome/common/extensions/docs/server2/api_schema_graph.py

Issue 25627002: Docserver: when checking for the existence of an API on a branch, just look at (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert some unnecessary stuff Created 7 years, 3 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: chrome/common/extensions/docs/server2/api_schema_graph.py
diff --git a/chrome/common/extensions/docs/server2/api_schema_graph.py b/chrome/common/extensions/docs/server2/api_schema_graph.py
index b81102a9380a318386bbb37625b79f3de7e4d803..85d70d4bbf6779be6d7e9b427e1bb8772789809c 100644
--- a/chrome/common/extensions/docs/server2/api_schema_graph.py
+++ b/chrome/common/extensions/docs/server2/api_schema_graph.py
@@ -4,7 +4,6 @@
import json
from collections import Iterable, Mapping
-from copy import deepcopy
class LookupResult(object):
'''Returned from APISchemaGraph.Lookup(), and relays whether or not
@@ -18,11 +17,17 @@ class LookupResult(object):
self.annotation = annotation
def __eq__(self, other):
- return self.found == other.found and self.annotation == other.annotation
+ return self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
+ def __repr__(self):
+ return '%s%s' % (type(self).__name__, repr(self.__dict__))
Jeffrey Yasskin 2013/10/02 00:19:17 This is going to give something like "LookupResult
not at google - send to devlin 2013/10/02 00:40:02 Yep it's what I want.
+
+ def __str__(self):
+ return repr(self)
+
class _GraphNode(dict):
'''Represents some element of an API schema, and allows extra information

Powered by Google App Engine
This is Rietveld 408576698