From d153458aaf3954d55bd1ccd81751c164d12d17e7 Mon Sep 17 00:00:00 2001 From: Tushar Goel Date: Thu, 7 Mar 2024 20:16:48 +0530 Subject: [PATCH] Fix linting errors Signed-off-by: Tushar Goel --- src/packageurl/utils.py | 2 +- tests/contrib/test_utils.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/packageurl/utils.py b/src/packageurl/utils.py index 6cef428..74c746f 100644 --- a/src/packageurl/utils.py +++ b/src/packageurl/utils.py @@ -41,7 +41,7 @@ def get_golang_purl(go_package: str): # github.com/gorilla/mux v1.8.1 # https://github.com/moby/moby/blob/6c10086976d07d4746e03dcfd188972a2f07e1c9/vendor.mod#L51 if " " in go_package: - go_package , _ , version = go_package.rpartition(" ") + go_package, _, version = go_package.rpartition(" ") parts = go_package.split("/") if not parts: return diff --git a/tests/contrib/test_utils.py b/tests/contrib/test_utils.py index 6baac9e..404dd20 100644 --- a/tests/contrib/test_utils.py +++ b/tests/contrib/test_utils.py @@ -66,7 +66,7 @@ def test_get_golang_purl(): ) assert golang_purl_1.name == "v3" assert golang_purl_1.namespace == "github.com/envoyproxy/go-control-plane/envoy/config/listener" - golang_purl_2 = get_golang_purl(go_package="github.com/grpc-ecosystem/go-grpc-middleware v1.3.0") - assert "pkg:golang/github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0" == str( - golang_purl_2 + golang_purl_2 = get_golang_purl( + go_package="github.com/grpc-ecosystem/go-grpc-middleware v1.3.0" ) + assert "pkg:golang/github.com/grpc-ecosystem/go-grpc-middleware@v1.3.0" == str(golang_purl_2)