Skip to content

Commit 404bc2f

Browse files
committed
All classes inherit from object in Python 3.
1 parent e97e1b4 commit 404bc2f

File tree

12 files changed

+19
-21
lines changed

12 files changed

+19
-21
lines changed

Diff for: cms/admin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from django.contrib import admin
22

33

4-
class ContentManageableAdmin(object):
4+
class ContentManageableAdmin:
55
"""
66
Base ModelAdmin class for any model that uses ContentManageable.
77
"""

Diff for: downloads/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_redirect_url(self, **kwargs):
3737
return reverse('download')
3838

3939

40-
class DownloadBase(object):
40+
class DownloadBase:
4141
""" Include latest releases in all views """
4242
def get_context_data(self, **kwargs):
4343
context = super().get_context_data(**kwargs)

Diff for: events/importer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
TIME_RESOLUTION = timedelta(0, 0, 1)
1111

1212

13-
class ICSImporter(object):
13+
class ICSImporter:
1414
def __init__(self, calendar):
1515
self.calendar = calendar
1616
super().__init__()

Diff for: events/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def is_past(self):
197197
return self.next_time == None
198198

199199

200-
class RuleMixin(object):
200+
class RuleMixin:
201201
def valid_dt_end(self):
202202
return minutes_resolution(self.dt_end) > minutes_resolution(self.dt_start)
203203

Diff for: feedbacks/models.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
class FeedbackCategory(NameSlugModel):
88

9-
class Meta(object):
9+
class Meta:
1010
verbose_name = 'feedback category'
1111
verbose_name_plural = 'feedback categories'
1212

1313

1414
class IssueType(NameSlugModel):
1515

16-
class Meta(object):
16+
class Meta:
1717
verbose_name = 'issue type'
1818
verbose_name_plural = 'issue types'
1919

@@ -29,7 +29,7 @@ class Feedback(models.Model):
2929
comment = models.TextField()
3030
created = models.DateTimeField(default=timezone.now, blank=True)
3131

32-
class Meta(object):
32+
class Meta:
3333
ordering = ['created']
3434
verbose_name = 'feedback'
3535
verbose_name_plural = 'feedbacks'

Diff for: jobs/models.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class JobType(NameSlugModel):
2222

2323
objects = JobTypeManager()
2424

25-
class Meta(object):
25+
class Meta:
2626
verbose_name = 'job technologies'
2727
verbose_name_plural = 'job technologies'
2828
ordering = ('name', )
@@ -33,7 +33,7 @@ class JobCategory(NameSlugModel):
3333

3434
objects = JobCategoryManager()
3535

36-
class Meta(object):
36+
class Meta:
3737
verbose_name = 'job category'
3838
verbose_name_plural = 'job categories'
3939
ordering = ('name', )

Diff for: jobs/views.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class JobBoardAdminRequiredMixin(GroupRequiredMixin):
1414
group_required = "Job Board Admin"
1515

1616

17-
class JobMixin(object):
17+
class JobMixin:
1818
def get_context_data(self, **kwargs):
1919
context = super().get_context_data(**kwargs)
2020

@@ -57,17 +57,17 @@ def get_queryset(self):
5757
return queryset.filter(q)
5858

5959

60-
class JobTypeMenu(object):
60+
class JobTypeMenu:
6161
def job_type_view(self):
6262
return True
6363

6464

65-
class JobCategoryMenu(object):
65+
class JobCategoryMenu:
6666
def job_category_view(self):
6767
return True
6868

6969

70-
class JobLocationMenu(object):
70+
class JobLocationMenu:
7171
def job_location_view(self):
7272
return True
7373

Diff for: pages/middleware.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from .views import PageView
55

66

7-
class PageFallbackMiddleware(object):
7+
class PageFallbackMiddleware:
88

99
def get_queryset(self, request):
1010
if request.user.is_staff:

Diff for: pages/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Page(ContentManageable):
5858

5959
objects = PageManager()
6060

61-
class Meta(object):
61+
class Meta:
6262
ordering = ['title', 'path']
6363

6464
def clean(self):

Diff for: pydotorg/middleware.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
2-
3-
class AdminNoCaching(object):
1+
class AdminNoCaching:
42
"""
53
Middleware to ensure the admin is not cached by Fastly or other caches
64
"""

Diff for: pydotorg/tests/test_context_processors.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from django.test import TestCase
33

44

5-
class MockRequest(object):
5+
class MockRequest:
66
def __init__(self, path):
77
self.path = path
88
super().__init__()

Diff for: users/forms.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class Meta(BaseUserChangeForm.Meta):
2828

2929
class UserProfileForm(ModelForm):
3030

31-
class Meta(object):
31+
class Meta:
3232
model = User
3333
fields = [
3434
'bio',
@@ -71,7 +71,7 @@ def __init__(self, *args, **kwargs):
7171
announcements.widget = forms.CheckboxInput()
7272
announcements.initial = False
7373

74-
class Meta(object):
74+
class Meta:
7575
model = Membership
7676
fields = [
7777
'legal_name',

0 commit comments

Comments
 (0)