Commits

Michał Górny  committed 0b24d1a

Simplify multiple use of t.flags.append() in parsing code.

  • Participants
  • Parent commits 6cba8f2

Comments (0)

Files changed (1)

File lib/flaggie/makeconf.py

 									flag = self.FlattenedToken.ExpandedFlag(
 										flagname, t.use_expanded)
 								self._useexpanded[t.use_expanded].remove(flag.name)
-								t.flags.append(flag)
 							elif [x for x in self._useexpanded if strippedtoken.startswith(x)]:
 								# inactive due to USE_EXPAND
-								t.flags.append(self.FlattenedToken.PartialFlag(e))
+								flag = self.FlattenedToken.PartialFlag(e)
 							elif lta and i == lasti:
-								t.flags.append(self.FlattenedToken.MakeConfFlag(e, lta))
+								flag = self.FlattenedToken.MakeConfFlag(e, lta)
 							else:
-								t.flags.append(self.FlattenedToken.MakeConfFlag(e))
+								flag = self.FlattenedToken.MakeConfFlag(e)
+							t.flags.append(flag)
 					else:
 						t.flags.append(self.FlattenedToken.Whitespace(e))