Skip to content

Commit 56aa35d

Browse files
Remove usage of str.removesuffix()
The removesuffix attribute is only available from Python 3.9+ Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
1 parent bc49ca0 commit 56aa35d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/packagedcode/swift.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ def get_dependencies(dependencies):
418418
def get_namespace_and_name(url):
419419
parsed_url = parse.urlparse(url)
420420
hostname = parsed_url.hostname
421-
path = parsed_url.path.removesuffix(".git")
421+
path = parsed_url.path.replace(".git", "")
422422
canonical_name = hostname + path
423423

424424
return canonical_name.rsplit("/", 1)

0 commit comments

Comments
 (0)