summaryrefslogtreecommitdiff
path: root/tests/primer
diff options
context:
space:
mode:
authorJacob Walls <jacobtylerwalls@gmail.com>2022-05-31 08:36:22 -0400
committerGitHub <noreply@github.com>2022-05-31 14:36:22 +0200
commit95835b02d3055fe9e1b0eea02508c4fe0b701aca (patch)
tree6ba491331912027eb602d02a8fa1e4dce18d173e /tests/primer
parente51ea8efdce7773c590d26894ab6cd912f0a28df (diff)
downloadpylint-git-95835b02d3055fe9e1b0eea02508c4fe0b701aca.tar.gz
Fix broken links in primer comments by stripping ".git" (#6768)
Diffstat (limited to 'tests/primer')
-rw-r--r--tests/primer/primer_tool.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/primer/primer_tool.py b/tests/primer/primer_tool.py
index 45c4d1b10..2e921f8a2 100644
--- a/tests/primer/primer_tool.py
+++ b/tests/primer/primer_tool.py
@@ -237,7 +237,8 @@ class Primer:
filepath = str(message["path"]).replace(
str(package_data.clone_directory), ""
)
- comment += f"{package_data.url}/blob/{package_data.branch}{filepath}#L{message['line']}\n"
+ without_suffix = package_data.url.rsplit(".git")[0]
+ comment += f"{without_suffix}/blob/{package_data.branch}{filepath}#L{message['line']}\n"
count += 1
print(message)
if missing_messages: