Skip to content

Commit 08a97bd

Browse files
committed
pre-commit linting
1 parent 2d20a10 commit 08a97bd

File tree

3 files changed

+46
-14
lines changed

3 files changed

+46
-14
lines changed

readthedocs/core/views/__init__.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: utf-8 -*-
2+
23
"""
34
Core views, including the main homepage,
45
@@ -50,7 +51,11 @@ def get_context_data(self, **kwargs):
5051
if not support_email:
5152
support_email = 'support@{domain}'.format(
5253
domain=getattr(
53-
settings, 'PRODUCTION_DOMAIN', 'readthedocs.org'))
54+
settings,
55+
'PRODUCTION_DOMAIN',
56+
'readthedocs.org',
57+
),
58+
)
5459

5560
context['support_email'] = support_email
5661
return context
@@ -89,8 +94,10 @@ def wipe_version(request, project_slug, version_slug):
8994
broadcast(type='build', task=remove_dir, args=[del_dir])
9095
return redirect('project_version_list', project_slug)
9196
return render(
92-
request, 'wipe_version.html',
93-
{'version': version, 'project': version.project})
97+
request,
98+
'wipe_version.html',
99+
{'version': version, 'project': version.project},
100+
)
94101

95102

96103
def server_error_500(request, template_name='500.html'):

readthedocs/gold/models.py

+26-8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
# -*- coding: utf-8 -*-
2+
13
"""Django models for recurring donations aka Gold Membership."""
2-
from __future__ import absolute_import
3-
from __future__ import division
4+
from __future__ import (
5+
absolute_import,
6+
division,
7+
print_function,
8+
unicode_literals,
9+
)
10+
411
import math
512

613
from django.db import models
@@ -9,7 +16,6 @@
916

1017
from readthedocs.projects.models import Project
1118

12-
1319
#: The membership options that are currently available
1420
LEVEL_CHOICES = (
1521
('v1-org-5', '$5/mo'),
@@ -32,11 +38,23 @@ class GoldUser(models.Model):
3238
pub_date = models.DateTimeField(_('Publication date'), auto_now_add=True)
3339
modified_date = models.DateTimeField(_('Modified date'), auto_now=True)
3440

35-
user = models.ForeignKey('auth.User', verbose_name=_('User'), unique=True, related_name='gold')
36-
level = models.CharField(_('Level'), max_length=20,
37-
choices=LEVEL_CHOICES, default=LEVEL_CHOICES[0][0])
38-
projects = models.ManyToManyField(Project, verbose_name=_('Projects'),
39-
related_name='gold_owners')
41+
user = models.ForeignKey(
42+
'auth.User',
43+
verbose_name=_('User'),
44+
unique=True,
45+
related_name='gold',
46+
)
47+
level = models.CharField(
48+
_('Level'),
49+
max_length=20,
50+
choices=LEVEL_CHOICES,
51+
default=LEVEL_CHOICES[0][0],
52+
)
53+
projects = models.ManyToManyField(
54+
Project,
55+
verbose_name=_('Projects'),
56+
related_name='gold_owners',
57+
)
4058

4159
last_4_card_digits = models.CharField(max_length=4)
4260
stripe_id = models.CharField(max_length=255)

readthedocs/integrations/models.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
# -*- coding: utf-8 -*-
2+
23
"""Integration models for external services."""
34

45
from __future__ import (
5-
absolute_import, division, print_function, unicode_literals)
6+
absolute_import,
7+
division,
8+
print_function,
9+
unicode_literals,
10+
)
611

712
import json
813
import re
914
import uuid
10-
from builtins import object, str
1115

16+
from builtins import object, str
1217
from django.contrib.contenttypes.fields import (
13-
GenericForeignKey, GenericRelation)
18+
GenericForeignKey,
19+
GenericRelation,
20+
)
1421
from django.contrib.contenttypes.models import ContentType
1522
from django.db import models, transaction
1623
from django.utils.encoding import python_2_unicode_compatible

0 commit comments

Comments
 (0)