Skip to content

Commit

Permalink
All classes inherit from object in Python 3.
Browse files Browse the repository at this point in the history
  • Loading branch information
berkerpeksag committed Mar 20, 2015
1 parent e97e1b4 commit 404bc2f
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion cms/admin.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.contrib import admin


class ContentManageableAdmin(object):
class ContentManageableAdmin:
"""
Base ModelAdmin class for any model that uses ContentManageable.
"""
Expand Down
2 changes: 1 addition & 1 deletion downloads/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_redirect_url(self, **kwargs):
return reverse('download')


class DownloadBase(object):
class DownloadBase:
""" Include latest releases in all views """
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
Expand Down
2 changes: 1 addition & 1 deletion events/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
TIME_RESOLUTION = timedelta(0, 0, 1)


class ICSImporter(object):
class ICSImporter:
def __init__(self, calendar):
self.calendar = calendar
super().__init__()
Expand Down
2 changes: 1 addition & 1 deletion events/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def is_past(self):
return self.next_time == None


class RuleMixin(object):
class RuleMixin:
def valid_dt_end(self):
return minutes_resolution(self.dt_end) > minutes_resolution(self.dt_start)

Expand Down
6 changes: 3 additions & 3 deletions feedbacks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@

class FeedbackCategory(NameSlugModel):

class Meta(object):
class Meta:
verbose_name = 'feedback category'
verbose_name_plural = 'feedback categories'


class IssueType(NameSlugModel):

class Meta(object):
class Meta:
verbose_name = 'issue type'
verbose_name_plural = 'issue types'

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

class Meta(object):
class Meta:
ordering = ['created']
verbose_name = 'feedback'
verbose_name_plural = 'feedbacks'
Expand Down
4 changes: 2 additions & 2 deletions jobs/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class JobType(NameSlugModel):

objects = JobTypeManager()

class Meta(object):
class Meta:
verbose_name = 'job technologies'
verbose_name_plural = 'job technologies'
ordering = ('name', )
Expand All @@ -33,7 +33,7 @@ class JobCategory(NameSlugModel):

objects = JobCategoryManager()

class Meta(object):
class Meta:
verbose_name = 'job category'
verbose_name_plural = 'job categories'
ordering = ('name', )
Expand Down
8 changes: 4 additions & 4 deletions jobs/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class JobBoardAdminRequiredMixin(GroupRequiredMixin):
group_required = "Job Board Admin"


class JobMixin(object):
class JobMixin:
def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)

Expand Down Expand Up @@ -57,17 +57,17 @@ def get_queryset(self):
return queryset.filter(q)


class JobTypeMenu(object):
class JobTypeMenu:
def job_type_view(self):
return True


class JobCategoryMenu(object):
class JobCategoryMenu:
def job_category_view(self):
return True


class JobLocationMenu(object):
class JobLocationMenu:
def job_location_view(self):
return True

Expand Down
2 changes: 1 addition & 1 deletion pages/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from .views import PageView


class PageFallbackMiddleware(object):
class PageFallbackMiddleware:

def get_queryset(self, request):
if request.user.is_staff:
Expand Down
2 changes: 1 addition & 1 deletion pages/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class Page(ContentManageable):

objects = PageManager()

class Meta(object):
class Meta:
ordering = ['title', 'path']

def clean(self):
Expand Down
4 changes: 1 addition & 3 deletions pydotorg/middleware.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@


class AdminNoCaching(object):
class AdminNoCaching:
"""
Middleware to ensure the admin is not cached by Fastly or other caches
"""
Expand Down
2 changes: 1 addition & 1 deletion pydotorg/tests/test_context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.test import TestCase


class MockRequest(object):
class MockRequest:
def __init__(self, path):
self.path = path
super().__init__()
Expand Down
4 changes: 2 additions & 2 deletions users/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Meta(BaseUserChangeForm.Meta):

class UserProfileForm(ModelForm):

class Meta(object):
class Meta:
model = User
fields = [
'bio',
Expand Down Expand Up @@ -71,7 +71,7 @@ def __init__(self, *args, **kwargs):
announcements.widget = forms.CheckboxInput()
announcements.initial = False

class Meta(object):
class Meta:
model = Membership
fields = [
'legal_name',
Expand Down

0 comments on commit 404bc2f

Please sign in to comment.