This branch looks nice Jon. What would you think of creating some helper functions like:
uses_Launchpad(thing)
You could then collapse this:
175 + if self.codehosting_usage == ServiceUsage.LAUNCHPAD: 176 + configured = True 177 + else: 178 + configured = False 179 return [dict(link=set_branch, 181 + configured=configured)]
to:
179 return [dict(link=set_branch, 181 + configured=uses_launchpad(self.codehosting_usage)
I guess you could do the same with:
configured = (self.codehosting_usage == ServiceUsage.LAUNCHPAD)
with less overhead.
« Back to merge proposal
This branch looks nice Jon. What would you think of creating some helper functions like:
uses_Launchpad( thing)
You could then collapse this:
175 + if self.codehostin g_usage == ServiceUsage. LAUNCHPAD: set_branch, configured) ]
176 + configured = True
177 + else:
178 + configured = False
179 return [dict(link=
181 + configured=
to:
179 return [dict(link= set_branch, uses_launchpad( self.codehostin g_usage)
181 + configured=
I guess you could do the same with:
configured = (self.codehosti ng_usage == ServiceUsage. LAUNCHPAD)
with less overhead.