Skip to content

Commit 8310e58

Browse files
committed
lint fix
1 parent 9af5521 commit 8310e58

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

readthedocs/builds/models.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
get_gitlab_username_repo,
7171
)
7272
from readthedocs.builds.version_slug import VersionSlugField
73+
from readthedocs.oauth.models import RemoteRepository
7374

7475

7576
log = logging.getLogger(__name__)
@@ -779,7 +780,7 @@ def get_commit_url(self):
779780
repo=repo,
780781
commit=self.commit
781782
)
782-
elif 'gitlab' in repo_url:
783+
if 'gitlab' in repo_url:
783784
user, repo = get_gitlab_username_repo(repo_url)
784785
if not user and not repo:
785786
return ''
@@ -790,7 +791,7 @@ def get_commit_url(self):
790791
repo=repo,
791792
commit=self.commit
792793
)
793-
elif 'bitbucket' in repo_url:
794+
if 'bitbucket' in repo_url:
794795
user, repo = get_bitbucket_username_repo(repo_url)
795796
if not user and not repo:
796797
return ''
@@ -801,8 +802,6 @@ def get_commit_url(self):
801802
repo=repo,
802803
commit=self.commit
803804
)
804-
else:
805-
log.info('Unknown Git provider for %s', self.project)
806805

807806
return ''
808807

readthedocs/rtd_tests/tests/test_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def setUp(self):
4646
class TestVersionModel(VersionMixin, TestCase):
4747

4848
def test_vcs_url_for_external_version(self):
49-
expected_url = f'https://github.com/pypa/pip/pull/{self.external_version.verbose_name}/'
49+
expected_url = f'https://github.com/pypa/pip/pull/{self.external_version.verbose_name}'
5050
self.assertEqual(self.external_version.vcs_url, expected_url)
5151

5252
def test_vcs_url_for_latest_version(self):

0 commit comments

Comments
 (0)