Skip to content

Commit 7200709

Browse files
Put docstring into a single line (#23)
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
1 parent 2f0226d commit 7200709

File tree

1 file changed

+10
-30
lines changed

1 file changed

+10
-30
lines changed

argocd/services/repository.py

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ def __init__(self, token=None):
1313
self.session.headers.update({"Authorization": f"Bearer {token}"})
1414

1515
def list(self, repo=None, force_refresh=False):
16-
"""
17-
ListRepositories gets a list of all configured repositories
18-
"""
16+
"""ListRepositories gets a list of all configured repositories"""
1917
params = {}
2018
if repo:
2119
params["repo"] = repo
@@ -28,9 +26,7 @@ def list(self, repo=None, force_refresh=False):
2826
return response.json()
2927

3028
def create(self, payload, upsert=False, creds_only=False):
31-
"""
32-
CreateRepository creates a new repository configuration
33-
"""
29+
"""CreateRepository creates a new repository configuration"""
3430
params = {}
3531
if upsert:
3632
params["upsert"] = upsert
@@ -43,18 +39,14 @@ def create(self, payload, upsert=False, creds_only=False):
4339
return response.json()
4440

4541
def update(self, repo, payload):
46-
"""
47-
UpdateRepository updates a repository configuration
48-
"""
42+
"""UpdateRepository updates a repository configuration"""
4943
response = self.session.put(
5044
f"{self.base_url}/api/v1/repositories/{repo}", json=payload
5145
)
5246
return response.json()
5347

5448
def get(self, repo, force_refresh=False):
55-
"""
56-
Get returns a repository or its credentials
57-
"""
49+
"""Get returns a repository or its credentials"""
5850
params = {}
5951
if force_refresh:
6052
params["forceRefresh"] = force_refresh
@@ -65,9 +57,7 @@ def get(self, repo, force_refresh=False):
6557
return response.json()
6658

6759
def delete(self, repo, force_refresh=False):
68-
"""
69-
DeleteRepository deletes a repository from the configuration
70-
"""
60+
"""DeleteRepository deletes a repository from the configuration"""
7161
params = {}
7262
if force_refresh:
7363
params["forceRefresh"] = force_refresh
@@ -78,9 +68,7 @@ def delete(self, repo, force_refresh=False):
7868
return response.json()
7969

8070
def list_apps(self, repo, revision=None):
81-
"""
82-
ListApps returns list of apps in the repo
83-
"""
71+
"""ListApps returns list of apps in the repo"""
8472
params = {}
8573
if revision:
8674
params["revision"] = revision
@@ -91,9 +79,7 @@ def list_apps(self, repo, revision=None):
9179
return response.json()
9280

9381
def list_charts(self, repo, force_refresh=False):
94-
"""
95-
GetHelmCharts returns list of helm charts in the specified repository
96-
"""
82+
"""GetHelmCharts returns list of helm charts in the specified repository"""
9783
params = {}
9884
if force_refresh:
9985
params["forceRefresh"] = force_refresh
@@ -104,9 +90,7 @@ def list_charts(self, repo, force_refresh=False):
10490
return response.json()
10591

10692
def list_refs(self, repo, force_refresh=False):
107-
"""
108-
RepositoryService_ListRefs
109-
"""
93+
"""RepositoryService_ListRefs"""
11094
params = {}
11195
if force_refresh:
11296
params["forceRefresh"] = force_refresh
@@ -135,9 +119,7 @@ def validate_access(
135119
proxy="",
136120
project="",
137121
):
138-
"""
139-
ValidateAccess validates access to a repository with given parameters
140-
"""
122+
"""ValidateAccess validates access to a repository with given parameters"""
141123
params = {}
142124
if username != "":
143125
params["username"] = username
@@ -175,9 +157,7 @@ def validate_access(
175157
return response.json()
176158

177159
def get_app(self, repo, payload):
178-
"""
179-
GetAppDetails returns application details by given path
180-
"""
160+
"""GetAppDetails returns application details by given path"""
181161
response = self.session.post(
182162
f"{self.base_url}/api/v1/repositories{repo}/appdetails", json=payload
183163
)

0 commit comments

Comments
 (0)