Skip to content

Commit 2f161d5

Browse files
STY: Apply ruff/pyupgrade rule UP030
UP030 Use implicit references for positional format fields
1 parent c7d2421 commit 2f161d5

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
@@ -91,10 +91,8 @@ def is_job_state_pending(self):
9191
# if initializing for more than 5 minute, failure due to
9292
# initialization and completion before registration
9393
sge_debug_print(
94-
"FAILURE! QJobInfo.IsPending found long running at {1} seconds"
95-
"'initializing' returning False for to break loop!\n{0}".format(
96-
self, time_diff
97-
)
94+
f"FAILURE! QJobInfo.IsPending found long running at {time_diff} seconds "
95+
f"'initializing' returning False for to break loop!\n{self}"
9896
)
9997
is_pending_status = True # Job initialization took too long, so report!
10098
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
@@ -130,9 +130,7 @@ def make_job_name(jobnumber, nodeslist):
130130
not self._dont_resubmit_completed_jobs
131131
or not cache_doneness_per_node[jobid]
132132
):
133-
values += "${{{0}}},".format(
134-
make_job_name(jobid, nodes)
135-
)
133+
values += f"${{{make_job_name(jobid, nodes)}}},"
136134
if (
137135
values != " "
138136
): # 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
@@ -130,9 +130,7 @@ def make_job_name(jobnumber, nodeslist):
130130
not self._dont_resubmit_completed_jobs
131131
or not cache_doneness_per_node[jobid]
132132
):
133-
values += "${{{0}}}:".format(
134-
make_job_name(jobid, nodes)
135-
)
133+
values += f"${{{make_job_name(jobid, nodes)}}}:"
136134
if (
137135
values != ""
138136
): # i.e. if some jobs were added to dependency list

0 commit comments

Comments
 (0)