Commit 046abd49 authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

models: use implied line continuations



Use the implied line continuations, and make the indentation more clear.
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent b18d5e2d
...@@ -92,11 +92,10 @@ class UserProfile(models.Model): ...@@ -92,11 +92,10 @@ class UserProfile(models.Model):
def contributor_projects(self): def contributor_projects(self):
submitters = Person.objects.filter(user = self.user) submitters = Person.objects.filter(user = self.user)
return Project.objects \ return Project.objects.filter(id__in =
.filter(id__in = \ Patch.objects.filter(
Patch.objects.filter( submitter__in = submitters)
submitter__in = submitters) \ .values('project_id').query)
.values('project_id').query)
def sync_person(self): def sync_person(self):
...@@ -115,8 +114,8 @@ class UserProfile(models.Model): ...@@ -115,8 +114,8 @@ class UserProfile(models.Model):
qs = qs.filter(archived = False) \ qs = qs.filter(archived = False) \
.filter(delegate = self.user) \ .filter(delegate = self.user) \
.filter(state__in = \ .filter(state__in =
State.objects.filter(action_required = True) \ State.objects.filter(action_required = True)
.values('pk').query) .values('pk').query)
return qs return qs
...@@ -309,7 +308,7 @@ class Comment(models.Model): ...@@ -309,7 +308,7 @@ class Comment(models.Model):
re.M | re.I) re.M | re.I)
def patch_responses(self): def patch_responses(self):
return ''.join([ match.group(0) + '\n' for match in \ return ''.join([ match.group(0) + '\n' for match in
self.response_re.finditer(self.content)]) self.response_re.finditer(self.content)])
class Meta: class Meta:
...@@ -362,7 +361,7 @@ class Bundle(models.Model): ...@@ -362,7 +361,7 @@ class Bundle(models.Model):
})) }))
def mbox(self): def mbox(self):
return '\n'.join([p.mbox().as_string(True) \ return '\n'.join([p.mbox().as_string(True)
for p in self.ordered_patches()]) for p in self.ordered_patches()])
class BundlePatch(models.Model): class BundlePatch(models.Model):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment