Skip to content

Commit 7c65af4

Browse files
Resolve linting messages in readthedocs.vcs_support.*
1 parent d27f970 commit 7c65af4

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

readthedocs/vcs_support/backends/git.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class Backend(BaseVCS):
1515
supports_branches = True
1616
fallback_branch = 'master' # default branch
1717

18-
1918
def __init__(self, *args, **kwargs):
2019
super(Backend, self).__init__(*args, **kwargs)
2120
self.token = kwargs.get('token', None)
@@ -30,8 +29,9 @@ def _get_clone_url(self):
3029
clone_url = 'https://%s@%s' % (self.token, hacked_url)
3130
return clone_url
3231
# Don't edit URL because all hosts aren't the same
33-
#else:
34-
#clone_url = 'git://%s' % (hacked_url)
32+
33+
# else:
34+
# clone_url = 'git://%s' % (hacked_url)
3535
return self.repo_url
3636

3737
def set_remote_url(self, url):
@@ -168,7 +168,7 @@ def checkout(self, identifier=None):
168168

169169
identifier = self.find_ref(identifier)
170170

171-
#Checkout the correct identifier for this branch.
171+
# Checkout the correct identifier for this branch.
172172
code, out, err = self.checkout_revision(identifier)
173173
if code != 0:
174174
return code, out, err

readthedocs/vcs_support/backends/svn.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ def up(self):
3737
("Failed to get code from '%s' (svn revert): %s"
3838
% (self.repo_url, retcode))
3939
)
40-
retcode, out, err = self.run('svn', 'up', '--accept', 'theirs-full',
41-
'--trust-server-cert', '--non-interactive')
40+
retcode, out, err = self.run(
41+
'svn', 'up', '--accept', 'theirs-full',
42+
'--trust-server-cert', '--non-interactive')
4243
if retcode != 0:
4344
raise ProjectImportError(
4445
"Failed to get code from '%s' (svn up): %s" % (self.repo_url,

readthedocs/vcs_support/base.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ class BaseVCS(BaseCLI):
8181
supports_tags = False # Whether this VCS supports tags or not.
8282
supports_branches = False # Whether this VCS supports branches or not.
8383

84-
#==========================================================================
84+
# =========================================================================
8585
# General methods
86-
#==========================================================================
86+
# =========================================================================
8787

8888
def __init__(self, project, version, **kwargs):
8989
self.default_branch = project.default_branch
@@ -107,11 +107,11 @@ def update(self):
107107
"""
108108
self.check_working_dir()
109109

110-
#==========================================================================
110+
# =========================================================================
111111
# Tag / Branch related methods
112112
# These methods only apply if supports_tags = True and/or
113113
# support_branches = True
114-
#==========================================================================
114+
# =========================================================================
115115

116116
@property
117117
def tags(self):
@@ -129,15 +129,13 @@ def branches(self):
129129
"""
130130
raise NotImplementedError
131131

132-
133132
@property
134133
def commit(self):
135134
"""
136135
Returns a string representing the current commit.
137136
"""
138137
raise NotImplementedError
139138

140-
141139
def checkout(self, identifier=None):
142140
"""
143141
Set the state to the given identifier.

readthedocs/vcs_support/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
log = logging.getLogger(__name__)
77

8+
89
class LockTimeout(Exception):
910
pass
1011

@@ -94,4 +95,3 @@ def __exit__(self, exc_type, exc_val, exc_tb):
9495
except (IOError, OSError):
9596
log.error("Lock (%s): Failed to release, ignoring..." % self.name,
9697
exc_info=True)
97-

0 commit comments

Comments
 (0)