FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

trivial: Resolve pep8 issues · getpatchwork/patchwork@12e9788 · GitHub

Commit 12e9788

Browse files
committed
trivial: Resolve pep8 issues
flake8 3.2.0 updates the pycodestyle dependency to 2.2.0, which in turn resolves a bug with E305. Upgrading results in a small number of additional pep8 issues. Resolve these now. Signed-off-by: Stephen Finucane <stephen@that.guru>
1 parent 10ff10a commit 12e9788

5 files changed

Lines changed: 32 additions & 1 deletion

File tree

‎patchwork/admin.py‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ class UserProfileInline(admin.StackedInline):
4747

4848
class UserAdmin(BaseUserAdmin):
4949
inlines = (UserProfileInline, )
50+
51+
5052
admin.site.unregister(User)
5153
admin.site.register(User, UserAdmin)
5254

@@ -61,6 +63,8 @@ class ProjectAdmin(admin.ModelAdmin):
6163
inlines = [
6264
DelegationRuleInline,
6365
]
66+
67+
6468
admin.site.register(Project, ProjectAdmin)
6569

6670

@@ -74,11 +78,15 @@ def has_account(self, person):
7478
has_account.boolean = True
7579
has_account.admin_order_field = 'user'
7680
has_account.short_description = 'Account'
81+
82+
7783
admin.site.register(Person, PersonAdmin)
7884

7985

8086
class StateAdmin(admin.ModelAdmin):
8187
list_display = ('name', 'action_required')
88+
89+
8290
admin.site.register(State, StateAdmin)
8391

8492

@@ -87,6 +95,8 @@ class SubmissionAdmin(admin.ModelAdmin):
8795
list_filter = ('project', )
8896
search_fields = ('name', 'submitter__name', 'submitter__email')
8997
date_hierarchy = 'date'
98+
99+
90100
admin.site.register(Submission, SubmissionAdmin)
91101
admin.site.register(CoverLetter, SubmissionAdmin)
92102

@@ -104,13 +114,17 @@ def is_pull_request(self, patch):
104114
is_pull_request.boolean = True
105115
is_pull_request.admin_order_field = 'pull_url'
106116
is_pull_request.short_description = 'Pull'
117+
118+
107119
admin.site.register(Patch, PatchAdmin)
108120

109121

110122
class CommentAdmin(admin.ModelAdmin):
111123
list_display = ('submission', 'submitter', 'date')
112124
search_fields = ('submission__name', 'submitter__name', 'submitter__email')
113125
date_hierarchy = 'date'
126+
127+
114128
admin.site.register(Comment, CommentAdmin)
115129

116130

@@ -130,6 +144,8 @@ class SeriesAdmin(admin.ModelAdmin):
130144
def received_all(self, series):
131145
return series.received_all
132146
received_all.boolean = True
147+
148+
133149
admin.site.register(Series, SeriesAdmin)
134150

135151

@@ -148,6 +164,8 @@ def received_all(self, series):
148164

149165
class SeriesReferenceAdmin(admin.ModelAdmin):
150166
model = SeriesReference
167+
168+
151169
admin.site.register(SeriesReference, SeriesReferenceAdmin)
152170

153171

@@ -157,16 +175,22 @@ class CheckAdmin(admin.ModelAdmin):
157175
exclude = ('date', )
158176
search_fields = ('patch__name', 'project__name')
159177
date_hierarchy = 'date'
178+
179+
160180
admin.site.register(Check, CheckAdmin)
161181

162182

163183
class BundleAdmin(admin.ModelAdmin):
164184
list_display = ('name', 'owner', 'project', 'public')
165185
list_filter = ('public', 'project')
166186
search_fields = ('name', 'owner')
187+
188+
167189
admin.site.register(Bundle, BundleAdmin)
168190

169191

170192
class TagAdmin(admin.ModelAdmin):
171193
list_display = ('name',)
194+
195+
172196
admin.site.register(Tag, TagAdmin)

‎patchwork/bin/pwclient‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ def patch_id_from_hash(rpc, project, hash):
377377
sys.exit(1)
378378
return patch_id
379379

380+
380381
auth_actions = ['check_create', 'update']
381382

382383

@@ -606,7 +607,8 @@ def main():
606607
config.read([CONFIG_FILE])
607608

608609
if not config.has_section('options') and os.path.exists(CONFIG_FILE):
609-
sys.stderr.write('%s is in the old format. Migrating it...' % CONFIG_FILE)
610+
sys.stderr.write('%s is in the old format. Migrating it...' %
611+
CONFIG_FILE)
610612

611613
old_project = config.get('base', 'project')
612614

@@ -793,5 +795,6 @@ def main():
793795
action_parser.print_help()
794796
sys.exit(1)
795797

798+
796799
if __name__ == "__main__":
797800
main()

‎patchwork/models.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ def _user_saved_callback(sender, created, instance, **kwargs):
172172
profile = UserProfile(user=instance)
173173
profile.save()
174174

175+
175176
models.signals.post_save.connect(_user_saved_callback, sender=User)
176177

177178

@@ -907,4 +908,5 @@ def _patch_change_callback(sender, instance, **kwargs):
907908
notification.last_modified = datetime.datetime.now()
908909
notification.save()
909910

911+
910912
models.signals.pre_save.connect(_patch_change_callback, sender=Patch)

‎patchwork/templatetags/syntax.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def _compile(value):
3333
regex, cls = value
3434
return re.compile(regex, re.M | re.I), cls
3535

36+
3637
_patch_span_res = [_compile(x) for x in [
3738
(r'^(Index:?|diff|\-\-\-|\+\+\+|\*\*\*) .*$', 'p_header'),
3839
(r'^\+.*$', 'p_add'),

‎patchwork/views/xmlrpc.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def _marshaled_dispatch(self, request):
133133

134134
return response
135135

136+
136137
dispatcher = PatchworkXMLRPCDispatcher()
137138

138139
# XMLRPC view function

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL