Skip to content

Commit a3d85df

Browse files
alexwlchanagjohnson
authored andcommitted
Docstring/PEP 257 fixes for the P* apps (#2822)
* Docstring/PEP 257 fixes for the privacy app * Docstring/PEP 257 fixes for the profiles app * Docstring/PEP 257 fixes for the projects app
1 parent b45ba98 commit a3d85df

File tree

4 files changed

+7
-17
lines changed

4 files changed

+7
-17
lines changed

readthedocs/privacy/backends/syncers.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ class LocalSyncer(object):
1212

1313
@classmethod
1414
def copy(cls, path, target, file=False, **kwargs):
15-
"""
16-
A copy command that works with files or directories.
17-
"""
15+
"""A copy command that works with files or directories."""
1816
log.info("Local Copy %s to %s" % (path, target))
1917
if file:
2018
if path == target:

readthedocs/profiles/views.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
"""
2-
Views for creating, editing and viewing site-specific user profiles.
3-
4-
"""
1+
"""Views for creating, editing and viewing site-specific user profiles."""
52

63
from django.contrib.auth.decorators import login_required
74
from django.contrib.auth.models import User
@@ -18,8 +15,7 @@ def create_profile(request, form_class, success_url=None,
1815
template_name='profiles/private/create_profile.html',
1916
extra_context=None):
2017
"""
21-
Create a profile for the current user, if one doesn't already
22-
exist.
18+
Create a profile for the current user, if one doesn't already exist.
2319
2420
If the user already has a profile, a redirect will be issued to the
2521
:view:`profiles.views.edit_profile` view.

readthedocs/projects/tasks.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,7 @@ def setup_vcs(self):
260260
status_code=404)
261261

262262
def get_env_vars(self):
263-
"""
264-
Get bash environment variables used for all builder commands.
265-
"""
263+
"""Get bash environment variables used for all builder commands."""
266264
env = {
267265
'READTHEDOCS': True,
268266
'READTHEDOCS_VERSION': self.version.slug,
@@ -912,9 +910,7 @@ def clear_html_artifacts(version):
912910

913911
@task(queue='web')
914912
def remove_path_from_web(path):
915-
"""
916-
Remove the given path from the web servers file system.
917-
"""
913+
"""Remove the given path from the web servers file system."""
918914
# Santity check for spaces in the path since spaces would result in
919915
# deleting unpredictable paths with "rm -rf".
920916
assert ' ' not in path, "No spaces allowed in path"

readthedocs/projects/views/private.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,11 +331,11 @@ class ImportView(PrivateViewMixin, TemplateView):
331331
wizard_class = ImportWizardView
332332

333333
def get(self, request, *args, **kwargs):
334-
'''Display list of repositories to import
334+
"""Display list of repositories to import
335335
336336
Adds a warning to the listing if any of the accounts connected for the
337337
user are not supported accounts.
338-
'''
338+
"""
339339
deprecated_accounts = (
340340
SocialAccount.objects
341341
.filter(user=self.request.user)

0 commit comments

Comments
 (0)