Skip to content

Commit 6f85f2a

Browse files
whitespace change
Mis-config of the Black code formatter caused some unhelpful attempts at saving line length.
1 parent 69e14e0 commit 6f85f2a

1 file changed

Lines changed: 7 additions & 19 deletions

File tree

group_identifier_assigner.py

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -226,41 +226,29 @@ def main(args):
226226
for group in co_groups:
227227
gid = group["Id"]
228228
identifier_data = get_co_group_identifiers(gid)
229+
229230
if identifier_data:
230231
identifier_list = identifier_data["Identifiers"]
231232

232-
project_id_index = identifier_index(
233-
id_list=identifier_list, id_type="ospoolproject"
234-
)
233+
project_id_index = identifier_index(id_list=identifier_list, id_type="ospoolproject")
235234
if project_id_index != -1:
236235
project_id = identifier_list[project_id_index]["Identifier"]
237-
is_project = (
238-
re.compile(ospool_pattern_str + "*").match(project_id) is not None
239-
)
236+
is_project = (re.compile(ospool_pattern_str + "*").match(project_id) is not None)
240237
else:
241238
is_project = False
242239

243240
osggid_index = identifier_index(identifier_list, "osggid")
244241
if osggid_index != -1:
245-
highest_osggid = max(
246-
highest_osggid, int(identifier_list[osggid_index]["Identifier"])
247-
)
242+
highest_osggid = max(highest_osggid, int(identifier_list[osggid_index]["Identifier"]))
248243
elif is_project is True:
249244
# for each, set a 'OSG GID' starting from 200000 and a 'OSG Group Name' that is the group name
250-
251-
osggid_to_assign = (
252-
200000 if highest_osggid + 1 < 200000 else highest_osggid + 1
253-
)
245+
osggid_to_assign = (200000 if highest_osggid + 1 < 200000 else highest_osggid + 1)
254246
highest_osggid = osggid_to_assign
255-
add_identifier_to_group(
256-
gid, type="osggid", identifier_name=osggid_to_assign
257-
)
247+
add_identifier_to_group(gid, type="osggid", identifier_name=osggid_to_assign)
258248

259249
project_name = project_id.removeprefix(ospool_pattern_str).lower()
260250
add_identifier_to_group(gid, type="osggroup", identifier_name=project_name)
261-
print(
262-
f"project {project_id}: added osggid {osggid_to_assign} and osg project name {project_name}"
263-
)
251+
print(f"project {project_id}: added osggid {osggid_to_assign} and osg project name {project_name}")
264252

265253

266254
if __name__ == "__main__":

0 commit comments

Comments
 (0)