Skip to content

Commit 60b5ddc

Browse files
committed
style: fix flake8 issues
1 parent 4cefdcd commit 60b5ddc

File tree

4 files changed

+12
-13
lines changed

4 files changed

+12
-13
lines changed

sw360/base.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -------------------------------------------------------------------------------
2-
# Copyright (c) 2023 Siemens
2+
# Copyright (c) 2023-2025 Siemens
33
# All Rights Reserved.
44
55
#
@@ -8,11 +8,10 @@
88
# -------------------------------------------------------------------------------
99

1010
from typing import Any, Dict, List, Optional, Tuple, Union
11+
from urllib.parse import urlencode
1112

1213
import requests
1314

14-
from urllib.parse import urlencode
15-
1615
from .sw360error import SW360Error
1716

1817

@@ -219,17 +218,17 @@ def _update_external_ids(self, current_data: Dict[str, Any], ext_id_name: str, e
219218
update = False
220219

221220
return (old_value, ext_id_data, update)
222-
221+
223222
def _add_params(self, url: str, params: Dict[str, str]) -> str:
224223
"""Add the given parameter to the given url"""
225-
224+
226225
query_string = urlencode(params)
227-
226+
228227
if "?" in url:
229228
return f"{url}&{query_string}"
230229
else:
231230
return f"{url}?{query_string}"
232-
231+
233232
@classmethod
234233
def get_id_from_href(cls, href: str) -> str:
235234
""""Extracts the identifier from the href and returns it

sw360/components.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_all_components(self, fields: str = "", page: int = -1, page_size: int =
3737
:rtype: list of JSON component objects
3838
:raises SW360Error: if there is a negative HTTP response
3939
"""
40-
40+
4141
fullbase_url = self.url + "resource/api/components"
4242
params = {}
4343

sw360/moderationrequests.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -------------------------------------------------------------------------------
2-
# Copyright (c) 2024 Siemens
2+
# Copyright (c) 2024-2025 Siemens
33
# All Rights Reserved.
44
55
#
@@ -66,7 +66,7 @@ def get_moderation_requests_by_state(self, state: str, all_details: bool = False
6666

6767
fullbase_url = self.url + "resource/api/moderationrequest/byState"
6868
params = {"state": state}
69-
69+
7070
if all_details:
7171
params["allDetails"] = "true"
7272

@@ -80,7 +80,7 @@ def get_moderation_requests_by_state(self, state: str, all_details: bool = False
8080
full_url = self._add_params(fullbase_url, params)
8181
resp = self.api_get(full_url)
8282
return resp
83-
83+
8484
def get_moderation_request(self, mr_id: str) -> Optional[Dict[str, Any]]:
8585
"""Get information of about a moderation request
8686

sw360/project.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -------------------------------------------------------------------------------
2-
# Copyright (c) 2019-2024 Siemens
2+
# Copyright (c) 2019-2025 Siemens
33
# Copyright (c) 2022 BMW CarIT GmbH
44
# All Rights Reserved.
55
@@ -85,7 +85,7 @@ def get_projects(self, all_details: bool = False, page: int = -1,
8585

8686
fullbase_url = self.url + "resource/api/projects"
8787
params = {}
88-
88+
8989
if all_details:
9090
params["allDetails"] = "true"
9191

0 commit comments

Comments
 (0)