Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
  • Loading branch information
TG1999 committed Mar 7, 2024
1 parent fdfef27 commit d153458
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/packageurl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/contrib/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit d153458

Please sign in to comment.