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

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: jeffrey 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
« no previous file with comments | « no previous file | chrome/common/extensions/docs/server2/app.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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__))
+
+ def __str__(self):
+ return repr(self)
+
class _GraphNode(dict):
'''Represents some element of an API schema, and allows extra information
« no previous file with comments | « no previous file | chrome/common/extensions/docs/server2/app.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698