From feda52f800ac14f033e3cd7792cf534f31be032f Mon Sep 17 00:00:00 2001 From: Alec Scott Date: Thu, 26 Oct 2023 23:12:20 -0700 Subject: [PATCH] akantu: use f-strings (#40466) Co-authored-by: Nicolas Richart --- var/spack/repos/builtin/packages/akantu/package.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/var/spack/repos/builtin/packages/akantu/package.py b/var/spack/repos/builtin/packages/akantu/package.py index 2952f9bb4a..bba92edcc8 100644 --- a/var/spack/repos/builtin/packages/akantu/package.py +++ b/var/spack/repos/builtin/packages/akantu/package.py @@ -65,10 +65,8 @@ def cmake_args(self): "-DAKANTU_HEAT_TRANSFER:BOOL=ON", "-DAKANTU_SOLID_MECHANICS:BOOL=ON", "-DAKANTU_STRUCTURAL_MECHANICS:BOOL=OFF", - "-DAKANTU_PARALLEL:BOOL={0}".format("ON" if spec.satisfies("+mpi") else "OFF"), - "-DAKANTU_PYTHON_INTERFACE:BOOL={0}".format( - "ON" if spec.satisfies("+python") else "OFF" - ), + f"-DAKANTU_PARALLEL:BOOL={'ON' if spec.satisfies('+mpi') else 'OFF'}", + f"-DAKANTU_PYTHON_INTERFACE:BOOL={'ON' if spec.satisfies('+python') else 'OFF'}", ] if spec.satisfies("@:3.0"): @@ -84,14 +82,14 @@ def cmake_args(self): solvers = [] if spec.satisfies("external_solvers=mumps"): solvers.append("Mumps") - args.append("-DMUMPS_DIR:PATH=${0}".format(spec["mumps"].prefix)) + args.append(f"-DMUMPS_DIR:PATH=${spec['mumps'].prefix}") if spec.satisfies("external_solvers=petsc"): solvers.append("PETSc") if len(solvers) > 0: args.extend( [ - "-DAKANTU_IMPLICIT_SOLVER:STRING={0}".format("+".join(solvers)), + f"-DAKANTU_IMPLICIT_SOLVER:STRING={'+'.join(solvers)}", "-DAKANTU_IMPLICIT:BOOL=ON", ] )