Skip to content

Commit 935aa8b

Browse files
committed
Lint
1 parent 11bf440 commit 935aa8b

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

readthedocs/doc_builder/environments.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,13 +472,12 @@ def run(self, *cmd, **kwargs):
472472
})
473473
return super(BuildEnvironment, self).run(*cmd, **kwargs)
474474

475-
def run_command_class(self, *cmd, **kwargs):
475+
def run_command_class(self, *cmd, **kwargs): # pylint: disable=arguments-differ
476476
kwargs.update({
477477
'build_env': self,
478478
})
479479
return super(BuildEnvironment, self).run_command_class(*cmd, **kwargs)
480480

481-
482481
@property
483482
def successful(self):
484483
"""Is build completed, without top level failures or failing commands.""" # noqa

readthedocs/projects/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,6 @@ def vcs_repo(self, version=LATEST, environment=None):
613613
:param version: version slug for the backend (``LATEST`` by default)
614614
:type version: str
615615
"""
616-
617616
# TODO: this seems to be the only method that receives a
618617
# ``version.slug`` instead of a ``Version`` instance (I prefer an
619618
# instance here)

readthedocs/projects/tasks.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,7 @@
6565

6666
class SyncRepositoryMixin(object):
6767

68-
"""
69-
Mixin that handles the VCS sync/update.
70-
"""
68+
"""Mixin that handles the VCS sync/update."""
7169

7270
@staticmethod
7371
def get_version(project=None, version_pk=None):
@@ -91,9 +89,7 @@ def get_version(project=None, version_pk=None):
9189
return APIVersion(**version_data)
9290

9391
def sync_repo(self):
94-
"""
95-
Checkout/update the project's repository and hit ``sync_versions`` API.
96-
"""
92+
"""Update the project's repository and hit ``sync_versions`` API."""
9793
# Make Dirs
9894
if not os.path.exists(self.project.doc_path):
9995
os.makedirs(self.project.doc_path)
@@ -158,15 +154,13 @@ def sync_repo(self):
158154

159155
class SyncRepositoryTask(SyncRepositoryMixin, Task):
160156

161-
"""
162-
Entry point to synchronize the VCS documentation.
163-
"""
157+
"""Entry point to synchronize the VCS documentation."""
164158

165159
max_retries = 5
166160
default_retry_delay = (7 * 60)
167161
name = __name__ + '.sync_repository'
168162

169-
def run(self, version_pk):
163+
def run(self, version_pk): # pylint: disable=arguments-differ
170164
"""
171165
Run the VCS synchronization.
172166
@@ -273,7 +267,6 @@ def run(self, pk, version_pk=None, build_pk=None, record=True,
273267
if not setup_successful:
274268
return False
275269

276-
277270
# Catch unhandled errors in the setup step
278271
except Exception as e: # noqa
279272
log.exception(

readthedocs/vcs_support/backends/git.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ def checkout_revision(self, revision=None):
6565
branch = self.default_branch or self.fallback_branch
6666
revision = 'origin/%s' % branch
6767

68-
code, out, err = self.run('git', 'checkout',
69-
'--force', revision)
68+
code, out, err = self.run(
69+
'git', 'checkout', '--force', revision)
7070
if code != 0:
7171
log.warning("Failed to checkout revision '%s': %s",
7272
revision, code)
7373
return [code, out, err]
7474

7575
def clone(self):
76-
code, _, _ = self.run('git', 'clone', '--recursive',
77-
self.repo_url, '.')
76+
code, _, _ = self.run(
77+
'git', 'clone', '--recursive', self.repo_url, '.')
7878
if code != 0:
7979
raise RepositoryError
8080

0 commit comments

Comments
 (0)