1. Michał Górny
  2. gentoopm

Commits

Michał Górny  committed 72e236c

Drop StringCompat from PMPackageDescription.

Right now, we require users to explcitily request .short or .long
description.

  • Participants
  • Parent commits 1f20863
  • Branches master

Comments (0)

Files changed (2)

File gentoopm/basepm/pkg.py

View file
  • Ignore whitespace
 	def __hash__(self):
 		return hash((str(self), self.state))
 
-class PMPackageDescription(ABCObject, StringCompat):
+class PMPackageDescription(ABCObject):
 	"""
 	Description of a package.
 	"""
 		"""
 		pass
 
-	def __str__(self):
-		"""
-		Stringify to the best package description. In other words, long package
-		description if available, short otherwise.
-
-		@returns: best package description
-		@rtype: string
-		"""
-		return str(self.long or self.short)
-
 class PMUseFlag(ABCObject, StringCompat):
 	"""
 	A base class for a USE flag supported by a package.

File gentoopm/tests/pkg.py

View file
  • Ignore whitespace
 		for p in self._pkgs:
 			p.inherits
 
-	def test_description(self):
-		""" Check whether description works as expected. """
-		for p in self._pkgs:
-			self.assertEqual(str(p.description),
-					p.description.long if p.description.long is not None
-					else p.description.short)
-
 	def test_inherits(self):
 		""" Check whether inherits are an iterable of stringifiables. """
 		for p in self._pkgs: