Skip to content

Commit 2f0226d

Browse files
Fixes DeepSource alerts (#21)
* Fixes PYL-W0622 * Adds Deepsource badge
1 parent cb6bb65 commit 2f0226d

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,7 @@ argocd
2626
## License
2727
![GitHub](https://img.shields.io/github/license/onlinejudge95/argocd)
2828

29+
## DeepSource
30+
[![DeepSource](https://deepsource.io/gh/onlinejudge95/argocd.svg/?label=active+issues&show_trend=true&token=k4vYSD7ZovLMXroo2Kxi9z3q)](https://deepsource.io/gh/onlinejudge95/argocd/?ref=repository-badge)
31+
2932
Python client for argocd server. This provides unique interface for the argocd REST APIs.

argocd/services/repository.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def validate_access(
125125
insecure=False,
126126
tls_client_cert_data="",
127127
tls_client_cert_key="",
128-
type="",
128+
access_type="",
129129
name="",
130130
enable_oci=False,
131131
github_app_private_key="",
@@ -151,8 +151,8 @@ def validate_access(
151151
params["tlsClientCertData"] = tls_client_cert_data
152152
if tls_client_cert_key != "":
153153
params["tlsClientCertKey"] = tls_client_cert_key
154-
if type != "":
155-
params["type"] = type
154+
if access_type != "":
155+
params["type"] = access_type
156156
if name != "":
157157
params["name"] = name
158158
if enable_oci:

tests/unit/services/test_repository.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -539,8 +539,10 @@ def test_repository_api_validate_access_tls_client_cert_key_return_ok(
539539
"argocd.services.repository.sessions.Session.post",
540540
mocks.mocked_success_repository_delete_response,
541541
)
542-
def test_repository_api_validate_access_type_return_ok(repository_service):
543-
response = repository_service.validate_access("dummy_repository", type="dummy_type")
542+
def test_repository_api_validate_access_access_type_return_ok(repository_service):
543+
response = repository_service.validate_access(
544+
"dummy_repository", access_type="dummy_access_type"
545+
)
544546

545547
assert isinstance(response, dict)
546548

0 commit comments

Comments
 (0)