Skip to content

Commit af194e0

Browse files
Bhavesh BhatiCopilot
andcommitted
Fix URI parser lint checks
Keep fail-closed validation branches explicit with narrowly scoped Pylint return-count suppressions. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b6a9837 commit af194e0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • azure-devops/azext_devops/dev/common

azure-devops/azext_devops/dev/common/uri.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def parse_azure_devops_git_remote(remote_url):
4949
return None
5050

5151

52-
def canonicalize_azure_devops_organization_url(url):
52+
def canonicalize_azure_devops_organization_url(url): # pylint: disable=too-many-return-statements
5353
if not url or _UNSAFE_URL_CHARACTERS.search(url):
5454
return None
5555

@@ -119,7 +119,7 @@ def is_valid_url(url):
119119
return True
120120

121121

122-
def _parse_azure_devops_https_git_remote(remote_url):
122+
def _parse_azure_devops_https_git_remote(remote_url): # pylint: disable=too-many-return-statements
123123
parsed_url = _parse_safe_https_url(remote_url, allow_userinfo=True)
124124
if parsed_url is None:
125125
return None
@@ -148,7 +148,7 @@ def _parse_azure_devops_https_git_remote(remote_url):
148148
return AzureDevOpsGitRemote(repository_url, organization_url, host)
149149

150150

151-
def _parse_azure_devops_ssh_git_remote(remote_url):
151+
def _parse_azure_devops_ssh_git_remote(remote_url): # pylint: disable=too-many-return-statements
152152
parsed_url = None
153153
lowered_url = remote_url.lower()
154154
if lowered_url.startswith('ssh://'):
@@ -213,7 +213,7 @@ def _parse_azure_devops_ssh_git_remote(remote_url):
213213
return AzureDevOpsGitRemote(repository_url, organization_url, https_host)
214214

215215

216-
def _parse_safe_https_url(url, allow_userinfo):
216+
def _parse_safe_https_url(url, allow_userinfo): # pylint: disable=too-many-return-statements
217217
if _UNSAFE_URL_CHARACTERS.search(url):
218218
return None
219219

0 commit comments

Comments
 (0)