diff --git a/nipype/algorithms/rapidart.py b/nipype/algorithms/rapidart.py index 99abf55b84..ff867ae26c 100644 --- a/nipype/algorithms/rapidart.py +++ b/nipype/algorithms/rapidart.py @@ -397,19 +397,13 @@ def _get_output_filenames(self, motionfile, output_dir): else: raise Exception("Unknown type of file") _, filename, ext = split_filename(infile) - artifactfile = os.path.join( - output_dir, "".join(("art.", filename, "_outliers.txt")) - ) - intensityfile = os.path.join( - output_dir, "".join(("global_intensity.", filename, ".txt")) - ) - statsfile = os.path.join(output_dir, "".join(("stats.", filename, ".txt"))) - normfile = os.path.join(output_dir, "".join(("norm.", filename, ".txt"))) - plotfile = os.path.join( - output_dir, "".join(("plot.", filename, ".", self.inputs.plot_type)) - ) - displacementfile = os.path.join(output_dir, "".join(("disp.", filename, ext))) - maskfile = os.path.join(output_dir, "".join(("mask.", filename, ext))) + artifactfile = os.path.join(output_dir, f"art.{filename}_outliers.txt") + intensityfile = os.path.join(output_dir, f"global_intensity.{filename}.txt") + statsfile = os.path.join(output_dir, f"stats.{filename}.txt") + normfile = os.path.join(output_dir, f"norm.{filename}.txt") + plotfile = os.path.join(output_dir, f"plot.{filename}.{self.inputs.plot_type}") + displacementfile = os.path.join(output_dir, f"disp.{filename}{ext}") + maskfile = os.path.join(output_dir, f"mask.{filename}{ext}") return ( artifactfile, intensityfile, @@ -760,7 +754,7 @@ def _get_output_filenames(self, motionfile, output_dir): """ (_, filename) = os.path.split(motionfile) (filename, _) = os.path.splitext(filename) - corrfile = os.path.join(output_dir, "".join(("qa.", filename, "_stimcorr.txt"))) + corrfile = os.path.join(output_dir, f"qa.{filename}_stimcorr.txt") return corrfile def _stimcorr_core(self, motionfile, intensityfile, designmatrix, cwd=None): diff --git a/nipype/interfaces/afni/base.py b/nipype/interfaces/afni/base.py index 3dcf209428..5c36ed5f61 100644 --- a/nipype/interfaces/afni/base.py +++ b/nipype/interfaces/afni/base.py @@ -292,7 +292,7 @@ def _gen_fname(self, basename, cwd=None, suffix=None, change_ext=True, ext=None) if ext is None: ext = Info.output_type_to_ext(self.inputs.outputtype) if change_ext: - suffix = "".join((suffix, ext)) if suffix else ext + suffix = f"{suffix}{ext}" if suffix else ext if suffix is None: suffix = "" diff --git a/nipype/interfaces/ants/resampling.py b/nipype/interfaces/ants/resampling.py index 2628984148..2b1da8e9f5 100644 --- a/nipype/interfaces/ants/resampling.py +++ b/nipype/interfaces/ants/resampling.py @@ -134,7 +134,7 @@ def _list_outputs(self): outputs = self._outputs().get() _, name, ext = split_filename(os.path.abspath(self.inputs.input_image)) outputs["output_image"] = os.path.join( - os.getcwd(), "".join((name, self.inputs.out_postfix, ext)) + os.getcwd(), f"{name}{self.inputs.out_postfix}{ext}" ) return outputs @@ -254,7 +254,7 @@ class WarpImageMultiTransform(ANTSCommand): def _gen_filename(self, name): if name == "output_image": _, name, ext = split_filename(os.path.abspath(self.inputs.input_image)) - return "".join((name, self.inputs.out_postfix, ext)) + return f"{name}{self.inputs.out_postfix}{ext}" return None def _format_arg(self, opt, spec, val): diff --git a/nipype/interfaces/base/core.py b/nipype/interfaces/base/core.py index 6f60a13063..3e17893aef 100644 --- a/nipype/interfaces/base/core.py +++ b/nipype/interfaces/base/core.py @@ -709,7 +709,7 @@ def version_from_command(self, flag="-v", cmd=None): out_environ = self._get_environ() env.update(out_environ) proc = sp.Popen( - " ".join((cmd, flag)), + f"{cmd} {flag}", shell=True, env=canonicalize_env(env), stdout=sp.PIPE, diff --git a/nipype/interfaces/base/specs.py b/nipype/interfaces/base/specs.py index 7db8388cd8..2d7a6018b9 100644 --- a/nipype/interfaces/base/specs.py +++ b/nipype/interfaces/base/specs.py @@ -136,7 +136,7 @@ def _deprecated_warn(self, obj, name, old, new): msg3 = "It has been replaced by %s." % trait_spec.new_name else: msg3 = "" - msg = " ".join((msg1, msg2, msg3)) + msg = f"{msg1} {msg2} {msg3}" if Version(str(trait_spec.deprecated)) < self.package_version: raise TraitError(msg) else: diff --git a/nipype/interfaces/brainsuite/brainsuite.py b/nipype/interfaces/brainsuite/brainsuite.py index 846132724d..cf7161c030 100644 --- a/nipype/interfaces/brainsuite/brainsuite.py +++ b/nipype/interfaces/brainsuite/brainsuite.py @@ -1801,7 +1801,7 @@ def getFileName(inputName, suffix): dotRegex = regex.compile("[^.]+") # extract between last slash and first period inputNoExtension = dotRegex.findall(fullInput)[0] - return os.path.abspath("".join((inputNoExtension, suffix))) + return os.path.abspath(f"{inputNoExtension}{suffix}") def l_outputs(self): diff --git a/nipype/interfaces/cat12/surface.py b/nipype/interfaces/cat12/surface.py index ffffaef036..4186bb899e 100644 --- a/nipype/interfaces/cat12/surface.py +++ b/nipype/interfaces/cat12/surface.py @@ -145,8 +145,8 @@ def _list_outputs(self): outputs[name_hemisphere] = [] if not isdefined(outputs[all_files_hemisphere]): outputs[all_files_hemisphere] = [] - generated_filename = ".".join( - [hemisphere, parameter_name, original_filename] + generated_filename = ( + f"{hemisphere}.{parameter_name}.{original_filename}" ) outputs[name_hemisphere].append( os.path.join(pth, generated_filename) diff --git a/nipype/interfaces/dtitk/base.py b/nipype/interfaces/dtitk/base.py index 2b6a2af6a4..6f46f8d404 100644 --- a/nipype/interfaces/dtitk/base.py +++ b/nipype/interfaces/dtitk/base.py @@ -89,7 +89,7 @@ def _gen_fname(self, basename, cwd=None, suffix=None, change_ext=True, ext=None) ext = Info.output_type_to_ext(self.inputs.output_type) if change_ext: if suffix: - suffix = "".join((suffix, ext)) + suffix = f"{suffix}{ext}" else: suffix = ext if suffix is None: diff --git a/nipype/interfaces/freesurfer/model.py b/nipype/interfaces/freesurfer/model.py index 1da92c1961..529fdea18e 100644 --- a/nipype/interfaces/freesurfer/model.py +++ b/nipype/interfaces/freesurfer/model.py @@ -674,7 +674,7 @@ def _list_outputs(self): outfile = fname_presuffix( self.inputs.in_file, newpath=os.getcwd(), - suffix=".".join(("_thresh", self.inputs.out_type)), + suffix=f"_thresh.{self.inputs.out_type}", use_ext=False, ) else: diff --git a/nipype/interfaces/freesurfer/preprocess.py b/nipype/interfaces/freesurfer/preprocess.py index c727e2c24c..3c038775da 100644 --- a/nipype/interfaces/freesurfer/preprocess.py +++ b/nipype/interfaces/freesurfer/preprocess.py @@ -2541,7 +2541,7 @@ def _format_arg(self, name, spec, value): cmd = " ".join((cmd, "-fa %.1f" % self.inputs.flip_list[i])) if isdefined(self.inputs.xfm_list): cmd = " ".join((cmd, "-at %s" % self.inputs.xfm_list[i])) - cmd = " ".join((cmd, file)) + cmd = f"{cmd} {file}" return cmd return super()._format_arg(name, spec, value) diff --git a/nipype/interfaces/fsl/base.py b/nipype/interfaces/fsl/base.py index 3b117b4cc5..cae9783362 100644 --- a/nipype/interfaces/fsl/base.py +++ b/nipype/interfaces/fsl/base.py @@ -237,7 +237,7 @@ def _gen_fname(self, basename, cwd=None, suffix=None, change_ext=True, ext=None) ext = Info.output_type_to_ext(self.inputs.output_type) if change_ext: if suffix: - suffix = "".join((suffix, ext)) + suffix = f"{suffix}{ext}" else: suffix = ext if suffix is None: diff --git a/nipype/interfaces/fsl/tests/test_preprocess.py b/nipype/interfaces/fsl/tests/test_preprocess.py index e32e5c574f..7f076f8d30 100644 --- a/nipype/interfaces/fsl/tests/test_preprocess.py +++ b/nipype/interfaces/fsl/tests/test_preprocess.py @@ -306,12 +306,12 @@ def test_flirt(setup_flirt): # Handle autogeneration of outfile pth, fname, ext = split_filename(infile) outfile = fsl_name(fsl.FLIRT(), "%s_flirt" % fname) - outfile = " ".join(["-out", outfile]) + outfile = f"-out {outfile}" # Handle autogeneration of outmatrix outmatrix = "%s_flirt.mat" % fname - outmatrix = " ".join(["-omat", outmatrix]) + outmatrix = f"-omat {outmatrix}" # Build command line - cmdline = " ".join([cmdline, outfile, outmatrix, param]) + cmdline = f"{cmdline} {outfile} {outmatrix} {param}" flirter = fsl.FLIRT(in_file=infile, reference=reffile) setattr(flirter.inputs, key, value) assert flirter.cmdline == cmdline @@ -319,8 +319,8 @@ def test_flirt(setup_flirt): # Test OutputSpec flirter = fsl.FLIRT(in_file=infile, reference=reffile) pth, fname, ext = split_filename(infile) - flirter.inputs.out_file = "".join(["foo", ext]) - flirter.inputs.out_matrix_file = "".join(["bar", ext]) + flirter.inputs.out_file = f"foo{ext}" + flirter.inputs.out_matrix_file = f"bar{ext}" outs = flirter._list_outputs() assert outs["out_file"] == os.path.join(os.getcwd(), flirter.inputs.out_file) assert outs["out_matrix_file"] == os.path.join( diff --git a/nipype/interfaces/io.py b/nipype/interfaces/io.py index 6bf46f6f9c..4ed411b1b5 100644 --- a/nipype/interfaces/io.py +++ b/nipype/interfaces/io.py @@ -1821,7 +1821,7 @@ def _get_files(self, path, key, dirval, altkey=None): else: globprefix = "*" keys = ensure_list(altkey) if altkey else [key] - globfmt = os.path.join(path, dirval, "".join((globprefix, "{}", globsuffix))) + globfmt = os.path.join(path, dirval, f"{globprefix}{{}}{globsuffix}") return [ os.path.abspath(f) for key in keys for f in glob.glob(globfmt.format(key)) ] diff --git a/nipype/interfaces/mne/base.py b/nipype/interfaces/mne/base.py index 45f7e0e9c8..39d23e253c 100644 --- a/nipype/interfaces/mne/base.py +++ b/nipype/interfaces/mne/base.py @@ -112,7 +112,7 @@ def _get_files(self, path, key, dirval, altkey=None): keydir = op.join(path, dirval) if altkey: key = altkey - globpattern = op.join(keydir, "".join((globprefix, key, globsuffix))) + globpattern = op.join(keydir, f"{globprefix}{key}{globsuffix}") return glob.glob(globpattern) def _list_outputs(self): diff --git a/nipype/interfaces/niftyfit/base.py b/nipype/interfaces/niftyfit/base.py index 1239fa967b..dc004c871c 100644 --- a/nipype/interfaces/niftyfit/base.py +++ b/nipype/interfaces/niftyfit/base.py @@ -45,5 +45,5 @@ def _gen_fname(self, basename, out_dir=None, suffix=None, ext=None): if ext is not None: final_ext = ext if suffix is not None: - final_bn = "".join((final_bn, suffix)) + final_bn = f"{final_bn}{suffix}" return os.path.abspath(os.path.join(out_dir, final_bn + final_ext)) diff --git a/nipype/interfaces/niftyreg/base.py b/nipype/interfaces/niftyreg/base.py index c507f27d72..76555c3573 100644 --- a/nipype/interfaces/niftyreg/base.py +++ b/nipype/interfaces/niftyreg/base.py @@ -132,5 +132,5 @@ def _gen_fname(self, basename, out_dir=None, suffix=None, ext=None): if ext is not None: final_ext = ext if suffix is not None: - final_bn = "".join((final_bn, suffix)) + final_bn = f"{final_bn}{suffix}" return os.path.abspath(os.path.join(out_dir, final_bn + final_ext)) diff --git a/nipype/interfaces/petpvc.py b/nipype/interfaces/petpvc.py index ac388f6b51..a1f042eed9 100644 --- a/nipype/interfaces/petpvc.py +++ b/nipype/interfaces/petpvc.py @@ -225,7 +225,7 @@ def _gen_fname( cwd = os.getcwd() if change_ext: if suffix: - suffix = "".join((suffix, ext)) + suffix = f"{suffix}{ext}" else: suffix = ext if suffix is None: diff --git a/nipype/interfaces/spm/preprocess.py b/nipype/interfaces/spm/preprocess.py index e53392b566..8a3a479705 100644 --- a/nipype/interfaces/spm/preprocess.py +++ b/nipype/interfaces/spm/preprocess.py @@ -1263,7 +1263,7 @@ def _list_outputs(self): outputs["normalized_source"] = self.inputs.source elif "write" in self.inputs.jobtype: if isdefined(self.inputs.write_preserve) and self.inputs.write_preserve: - prefixNorm = "".join(["m", self.inputs.out_prefix]) + prefixNorm = f"m{self.inputs.out_prefix}" else: prefixNorm = self.inputs.out_prefix outputs["normalized_files"] = [] diff --git a/nipype/pipeline/engine/utils.py b/nipype/pipeline/engine/utils.py index d947735cb0..b52fdcf25e 100644 --- a/nipype/pipeline/engine/utils.py +++ b/nipype/pipeline/engine/utils.py @@ -457,9 +457,9 @@ def get_print_name(node, simple_form=True): if len(pkglist) > 2: destclass = ".%s" % pkglist[2] if simple_form: - name = node.fullname + destclass + name = f"{node.fullname}{destclass}" else: - name = ".".join([node.fullname, interface]) + destclass + name = f"{node.fullname}.{interface}{destclass}" if simple_form: parts = name.split(".") if len(parts) > 2: @@ -1565,7 +1565,7 @@ def write_workflow_prov(graph, filename=None, format="all"): _, hashval, _, _ = node.hash_exists() attrs = { pm.PROV["type"]: nipype_ns[classname], - pm.PROV["label"]: "_".join((classname, node.name)), + pm.PROV["label"]: f"{classname}_{node.name}", nipype_ns["hashval"]: hashval, } process = ps.g.activity(get_id(), None, None, attrs) diff --git a/nipype/pipeline/engine/workflows.py b/nipype/pipeline/engine/workflows.py index fd7c8b9cd0..ba2e813e14 100644 --- a/nipype/pipeline/engine/workflows.py +++ b/nipype/pipeline/engine/workflows.py @@ -394,10 +394,7 @@ def list_node_names(self): for node in nx.topological_sort(self._graph): if isinstance(node, Workflow): outlist.extend( - [ - ".".join((node.name, nodename)) - for nodename in node.list_node_names() - ] + f"{node.name}.{nodename}" for nodename in node.list_node_names() ) else: outlist.append(node.name) @@ -931,7 +928,7 @@ def _reset_hierarchy(self): if isinstance(node, Workflow): node._reset_hierarchy() for innernode in node._graph.nodes(): - innernode._hierarchy = ".".join((self.name, innernode._hierarchy)) + innernode._hierarchy = f"{self.name}.{innernode._hierarchy}" else: node._hierarchy = self.name @@ -995,7 +992,7 @@ def _generate_flatgraph(self): # logger.debug('expanding workflow: %s', node) node._generate_flatgraph() for innernode in node._graph.nodes(): - innernode._hierarchy = ".".join((self.name, innernode._hierarchy)) + innernode._hierarchy = f"{self.name}.{innernode._hierarchy}" self._graph.add_nodes_from(node._graph.nodes()) self._graph.add_edges_from(node._graph.edges(data=True)) if nodes2remove: diff --git a/nipype/pipeline/plugins/tests/test_legacymultiproc_nondaemon.py b/nipype/pipeline/plugins/tests/test_legacymultiproc_nondaemon.py index 9d0d490a87..7451b6e25c 100644 --- a/nipype/pipeline/plugins/tests/test_legacymultiproc_nondaemon.py +++ b/nipype/pipeline/plugins/tests/test_legacymultiproc_nondaemon.py @@ -122,7 +122,7 @@ def run_multiproc_nondaemon_with_flag(nondaemon_flag): plugin_args={"n_procs": 2, "non_daemon": nondaemon_flag}, ) - names = [".".join((node._hierarchy, node.name)) for node in execgraph.nodes()] + names = [f"{node._hierarchy}.{node.name}" for node in execgraph.nodes()] node = list(execgraph.nodes())[names.index("pipe.f2")] result = node.get_output("sum_out") os.chdir(cur_dir) diff --git a/nipype/pipeline/plugins/tests/test_linear.py b/nipype/pipeline/plugins/tests/test_linear.py index 82ba752a01..519d978de6 100644 --- a/nipype/pipeline/plugins/tests/test_linear.py +++ b/nipype/pipeline/plugins/tests/test_linear.py @@ -39,7 +39,7 @@ def test_run_in_series(tmpdir): pipe.base_dir = os.getcwd() mod1.inputs.input1 = 1 execgraph = pipe.run(plugin="Linear") - names = [".".join((node._hierarchy, node.name)) for node in execgraph.nodes()] + names = [f"{node._hierarchy}.{node.name}" for node in execgraph.nodes()] node = list(execgraph.nodes())[names.index("pipe.mod1")] result = node.get_output("output1") assert result == [1, 1] diff --git a/nipype/pipeline/plugins/tests/test_oar.py b/nipype/pipeline/plugins/tests/test_oar.py index 91622d4dd7..57d0d54e84 100644 --- a/nipype/pipeline/plugins/tests/test_oar.py +++ b/nipype/pipeline/plugins/tests/test_oar.py @@ -38,7 +38,7 @@ def test_run_oargraph(tmp_path): pipe.base_dir = os.getcwd() mod1.inputs.input1 = 1 execgraph = pipe.run(plugin="OAR") - names = [".".join((node._hierarchy, node.name)) for node in execgraph.nodes()] + names = [f"{node._hierarchy}.{node.name}" for node in execgraph.nodes()] node = list(execgraph.nodes())[names.index("pipe.mod1")] result = node.get_output("output1") assert result == [1, 1] diff --git a/nipype/pipeline/plugins/tests/test_pbs.py b/nipype/pipeline/plugins/tests/test_pbs.py index 1151fb5ad2..7a44ba3dc7 100644 --- a/nipype/pipeline/plugins/tests/test_pbs.py +++ b/nipype/pipeline/plugins/tests/test_pbs.py @@ -37,7 +37,7 @@ def test_run_pbsgraph(tmp_path): pipe.connect([(mod1, mod2, [("output1", "input1")])]) mod1.inputs.input1 = 1 execgraph = pipe.run(plugin="PBSGraph") - names = [".".join((node._hierarchy, node.name)) for node in execgraph.nodes()] + names = [f"{node._hierarchy}.{node.name}" for node in execgraph.nodes()] node = list(execgraph.nodes())[names.index("pipe.mod1")] result = node.get_output("output1") assert result == [1, 1] diff --git a/nipype/pipeline/plugins/tests/test_somaflow.py b/nipype/pipeline/plugins/tests/test_somaflow.py index 2eb9a966b6..f9a6a07b16 100644 --- a/nipype/pipeline/plugins/tests/test_somaflow.py +++ b/nipype/pipeline/plugins/tests/test_somaflow.py @@ -42,7 +42,7 @@ def test_run_somaflow(tmpdir): pipe.base_dir = os.getcwd() mod1.inputs.input1 = 1 execgraph = pipe.run(plugin="SomaFlow") - names = [".".join((node._hierarchy, node.name)) for node in execgraph.nodes()] + names = [f"{node._hierarchy}.{node.name}" for node in execgraph.nodes()] node = list(execgraph.nodes())[names.index("pipe.mod1")] result = node.get_output("output1") assert result == [1, 1] diff --git a/nipype/pipeline/plugins/tools.py b/nipype/pipeline/plugins/tools.py index 8028535b01..bce3eb82da 100644 --- a/nipype/pipeline/plugins/tools.py +++ b/nipype/pipeline/plugins/tools.py @@ -83,10 +83,8 @@ def report_nodes_not_run(notrun): if notrun: logger.info("***********************************") for info in notrun: - logger.error( - "could not run node: %s" - % ".".join((info["node"]._hierarchy, info["node"]._id)) - ) + node = info["node"] + logger.error(f"could not run node: {node._hierarchy}.{node._id}") logger.info("crashfile: %s" % info["crashfile"]) logger.debug("The following dependent nodes were not run") for subnode in info["dependents"]: diff --git a/nipype/utils/docparse.py b/nipype/utils/docparse.py index 0cbaf1ff07..c56d847738 100644 --- a/nipype/utils/docparse.py +++ b/nipype/utils/docparse.py @@ -118,7 +118,7 @@ def format_params(paramlist, otherlist=None): otherlist.insert(0, hdr) otherlist.insert(0, "\n") otherparams = "\n".join(otherlist) - doc = "".join([doc, otherparams]) + doc = f"{doc}{otherparams}" return doc @@ -251,7 +251,7 @@ def get_doc(cmd, opt_map, help_flag=None, trap_error=True): if cmd_path == "": raise Exception("Command %s not found" % cmd.split(" ")[0]) if help_flag: - cmd = " ".join((cmd, help_flag)) + cmd = f"{cmd} {help_flag}" doc = grab_doc(cmd, trap_error) opts = reverse_opt_map(opt_map) return build_doc(doc, opts) @@ -332,7 +332,7 @@ def get_params_from_doc(cmd, style="--", help_flag=None, trap_error=True): if cmd_path == "": raise Exception("Command %s not found" % cmd.split(" ")[0]) if help_flag: - cmd = " ".join((cmd, help_flag)) + cmd = f"{cmd} {help_flag}" doc = grab_doc(cmd, trap_error) return _parse_doc(doc, style) diff --git a/nipype/utils/filemanip.py b/nipype/utils/filemanip.py index b388c9122a..b11057477f 100644 --- a/nipype/utils/filemanip.py +++ b/nipype/utils/filemanip.py @@ -137,7 +137,7 @@ def hash_rename(filename, hashvalue): and sets path to output_directory """ path, name, ext = split_filename(filename) - newfilename = "".join((name, "_0x", hashvalue, ext)) + newfilename = f"{name}_0x{hashvalue}{ext}" return op.join(path, newfilename) diff --git a/nipype/utils/tests/test_filemanip.py b/nipype/utils/tests/test_filemanip.py index 146a245841..de33be016b 100644 --- a/nipype/utils/tests/test_filemanip.py +++ b/nipype/utils/tests/test_filemanip.py @@ -87,7 +87,7 @@ def test_hash_rename(filename, newname): def test_check_forhash(): fname = "foobar" orig_hash = "_0x4323dbcefdc51906decd8edcb3327943" - hashed_name = "".join((fname, orig_hash, ".nii")) + hashed_name = f"{fname}{orig_hash}.nii" result, hash = check_forhash(hashed_name) assert result assert hash == [orig_hash] diff --git a/tools/checkspecs.py b/tools/checkspecs.py index bf740f0581..ea3d877484 100644 --- a/tools/checkspecs.py +++ b/tools/checkspecs.py @@ -143,7 +143,7 @@ def _parse_lines(self, linesource, module): # exclude private stuff name = self._get_object_name(line) if not name.startswith("_") and self._survives_exclude( - ".".join((module, name)), "class" + f"{module}.{name}", "class" ): classes.append(name) else: @@ -449,7 +449,7 @@ def discover_modules(self): # Check directory names for packages root_uri = self._path2uri(os.path.join(self.root_path, dirpath)) for dirname in dirnames[:]: # copy list - we modify inplace - package_uri = ".".join((root_uri, dirname)) + package_uri = f"{root_uri}.{dirname}" if self._uri2path(package_uri) and self._survives_exclude( package_uri, "package" ): @@ -459,7 +459,7 @@ def discover_modules(self): # Check filenames for modules for filename in filenames: module_name = filename[:-3] - module_uri = ".".join((root_uri, module_name)) + module_uri = f"{root_uri}.{module_name}" if self._uri2path(module_uri) and self._survives_exclude( module_uri, "module" ):