diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-06-01 10:05:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-01 10:05:33 +0200 |
commit | a0786d3cbb120c0969726dbf082d9ea667c04bfc (patch) | |
tree | ff76b0f32ac4cfeaac54ebc82f8a962f0e80507c /tests/primer | |
parent | bd33f79b69bef522fd8d0790d215213954a82707 (diff) | |
download | pylint-git-a0786d3cbb120c0969726dbf082d9ea667c04bfc.tar.gz |
Fix ``.git`` in package links in the primer (#6782)
Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
Diffstat (limited to 'tests/primer')
-rw-r--r-- | tests/primer/packages_to_prime.json | 6 | ||||
-rw-r--r-- | tests/primer/primer_tool.py | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/primer/packages_to_prime.json b/tests/primer/packages_to_prime.json index a79c7d439..06e456eff 100644 --- a/tests/primer/packages_to_prime.json +++ b/tests/primer/packages_to_prime.json @@ -19,12 +19,12 @@ "branch": "main", "directories": ["pandas"], "pylint_additional_args": ["--ignore-patterns=\"test_"], - "url": "https://github.com/pandas-dev/pandas.git" + "url": "https://github.com/pandas-dev/pandas" }, "psycopg": { "branch": "master", "directories": ["psycopg/psycopg"], - "url": "https://github.com/psycopg/psycopg.git" + "url": "https://github.com/psycopg/psycopg" }, "pygame": { "branch": "main", @@ -39,6 +39,6 @@ "sentry": { "branch": "master", "directories": ["src/sentry"], - "url": "https://github.com/getsentry/sentry.git" + "url": "https://github.com/getsentry/sentry" } } diff --git a/tests/primer/primer_tool.py b/tests/primer/primer_tool.py index 8fdac6817..240ec3c30 100644 --- a/tests/primer/primer_tool.py +++ b/tests/primer/primer_tool.py @@ -240,8 +240,10 @@ class Primer: filepath = str(message["path"]).replace( str(package_data.clone_directory), "" ) - without_suffix = package_data.url.rsplit(".git")[0] - comment += f"{without_suffix}/blob/{package_data.branch}{filepath}#L{message['line']}\n" + assert not package_data.url.endswith( + ".git" + ), "You don't need the .git at the end of the github url." + comment += f"{package_data.url}/blob/{package_data.branch}{filepath}#L{message['line']}\n" count += 1 print(message) if missing_messages: |