Skip to content

Commit 44983e0

Browse files
STY: Apply ruff/pyupgrade rule UP030
UP030 Use implicit references for positional format fields
1 parent 6e65fc1 commit 44983e0

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

nipype/pipeline/plugins/sge.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ def is_job_state_pending(self):
9090
# if initializing for more than 5 minute, failure due to
9191
# initialization and completion before registration
9292
sge_debug_print(
93-
"FAILURE! QJobInfo.IsPending found long running at {1} seconds"
94-
"'initializing' returning False for to break loop!\n{0}".format(
95-
self, time_diff
96-
)
93+
f"FAILURE! QJobInfo.IsPending found long running at {time_diff} seconds "
94+
f"'initializing' returning False for to break loop!\n{self}"
9795
)
9896
is_pending_status = True # Job initialization took too long, so report!
9997
else: # self.is_running() || self.is_pending():

nipype/pipeline/plugins/sgegraph.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,7 @@ def make_job_name(jobnumber, nodeslist):
129129
not self._dont_resubmit_completed_jobs
130130
or not cache_doneness_per_node[jobid]
131131
):
132-
values += "${{{0}}},".format(
133-
make_job_name(jobid, nodes)
134-
)
132+
values += f"${{{make_job_name(jobid, nodes)}}},"
135133
if (
136134
values != " "
137135
): # i.e. if some jobs were added to dependency list

nipype/pipeline/plugins/slurmgraph.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,7 @@ def make_job_name(jobnumber, nodeslist):
129129
not self._dont_resubmit_completed_jobs
130130
or not cache_doneness_per_node[jobid]
131131
):
132-
values += "${{{0}}}:".format(
133-
make_job_name(jobid, nodes)
134-
)
132+
values += f"${{{make_job_name(jobid, nodes)}}}:"
135133
if (
136134
values != ""
137135
): # i.e. if some jobs were added to dependency list

0 commit comments

Comments
 (0)