Commits

Michał Górny committed 22ef5f9

Implement modifier-based removal interface for USE_EXPAND.

Comments (0)

Files changed (1)

lib/flaggie/makeconf.py

 				self.prefix = '%s_' % use_expanded_from
 				MakeConfVariable.FlattenedToken.MakeConfFlag.__init__(self, s)
 
+			@property
+			def removed(self):
+				return self.modifier == '-'
+
+			@removed.setter
+			def removed(self, val):
+				self.modifier = '-' if val else ''
+
 			def toString(self, raw = False):
 				ret = MakeConfVariable.FlattenedToken.MakeConfFlag.toString(self)
 				if raw:
-					if ret.startswith('-'):
-						ret = ''
-					else:
-						ret = ret.replace(self.prefix, '', 1)
+					ret = ret.replace(self.prefix, '', 1)
 				return ret
 
 		class Whitespace(object):