[kupfer] objects: Adapt TextSource for Source compatibility



commit 3462dd6a11c42aaaf3937c3f65f73241e93e3ba5
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Wed Sep 9 18:24:31 2009 +0200

    objects: Adapt TextSource for Source compatibility
    
    TextSource is a pseudo Source and should adapt some parts of the
    Source protocol to sneak in unnoticed.

 kupfer/objects.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/kupfer/objects.py b/kupfer/objects.py
index 57f9024..302d6b0 100644
--- a/kupfer/objects.py
+++ b/kupfer/objects.py
@@ -1176,14 +1176,14 @@ class TextSource (KupferObject):
 	def get_rank(self):
 		"""All items are given this rank"""
 		return 50
-	# This is not yet implemented
-	#def has_ranked_items(self):
-	#"""If True, use get_ranked_items(), else get_items()"""
-	#def get_ranked_items(self, text):
-	#"""Return a sequence of tuple of (item, rank)"""
+
 	def get_items(self, text):
 		"""Get leaves for unicode string @text"""
 		return ()
+
+	def has_parent(self):
+		return False
+
 	def provides(self):
 		"""A seq of the types of items it provides"""
 		yield Leaf



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]