Skip to content

Docstring/PEP 257 fixes for the P* apps #2822

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions readthedocs/privacy/backends/syncers.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ class LocalSyncer(object):

@classmethod
def copy(cls, path, target, file=False, **kwargs):
"""
A copy command that works with files or directories.
"""
"""A copy command that works with files or directories."""
log.info("Local Copy %s to %s" % (path, target))
if file:
if path == target:
Expand Down
8 changes: 2 additions & 6 deletions readthedocs/profiles/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
"""
Views for creating, editing and viewing site-specific user profiles.

"""
"""Views for creating, editing and viewing site-specific user profiles."""

from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
Expand All @@ -18,8 +15,7 @@ def create_profile(request, form_class, success_url=None,
template_name='profiles/private/create_profile.html',
extra_context=None):
"""
Create a profile for the current user, if one doesn't already
exist.
Create a profile for the current user, if one doesn't already exist.

If the user already has a profile, a redirect will be issued to the
:view:`profiles.views.edit_profile` view.
Expand Down
8 changes: 2 additions & 6 deletions readthedocs/projects/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,7 @@ def setup_vcs(self):
status_code=404)

def get_env_vars(self):
"""
Get bash environment variables used for all builder commands.
"""
"""Get bash environment variables used for all builder commands."""
env = {
'READTHEDOCS': True,
'READTHEDOCS_VERSION': self.version.slug,
Expand Down Expand Up @@ -912,9 +910,7 @@ def clear_html_artifacts(version):

@task(queue='web')
def remove_path_from_web(path):
"""
Remove the given path from the web servers file system.
"""
"""Remove the given path from the web servers file system."""
# Santity check for spaces in the path since spaces would result in
# deleting unpredictable paths with "rm -rf".
assert ' ' not in path, "No spaces allowed in path"
Expand Down
4 changes: 2 additions & 2 deletions readthedocs/projects/views/private.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ class ImportView(PrivateViewMixin, TemplateView):
wizard_class = ImportWizardView

def get(self, request, *args, **kwargs):
'''Display list of repositories to import
"""Display list of repositories to import

Adds a warning to the listing if any of the accounts connected for the
user are not supported accounts.
'''
"""
deprecated_accounts = (
SocialAccount.objects
.filter(user=self.request.user)
Expand Down