FIX: Purge deprecated exception content accesses
Showing 3 of 4 files from the diff.
nipype/utils/filemanip.py
changed.
nipype/utils/subprocess.py
changed.
nipype/interfaces/io.py
changed.
Other files ignored by Codecov
nipype/interfaces/base/tests/test_specs.py
has changed.
@@ -439,7 +439,7 @@
Loading
439 | 439 | fmlogger.debug("Copying File: %s->%s", newfile, originalfile) |
|
440 | 440 | shutil.copyfile(originalfile, newfile) |
|
441 | 441 | except shutil.Error as e: |
|
442 | - | fmlogger.warning(e.message) |
|
442 | + | fmlogger.warning(str(e)) |
|
443 | 443 | ||
444 | 444 | # Associated files |
|
445 | 445 | if copy_related_files: |
@@ -870,10 +870,8 @@
Loading
870 | 870 | o, e = proc.communicate() |
|
871 | 871 | deps = o.rstrip() |
|
872 | 872 | except Exception as ex: |
|
873 | - | deps = '"%s" failed' % command |
|
874 | - | fmlogger.warning( |
|
875 | - | "Could not get dependencies of %s. Error:\n%s", name, ex.message |
|
876 | - | ) |
|
873 | + | deps = f'{command!r} failed' |
|
874 | + | fmlogger.warning(f"Could not get dependencies of {name}s. Error:\n{ex}") |
|
877 | 875 | return deps |
|
878 | 876 | ||
879 | 877 |
@@ -1010,11 +1010,8 @@
Loading
1010 | 1010 | try: |
|
1011 | 1011 | filledtemplate = template % tuple(argtuple) |
|
1012 | 1012 | except TypeError as e: |
|
1013 | - | raise TypeError( |
|
1014 | - | e.message |
|
1015 | - | + ": Template %s failed to convert with args %s" |
|
1016 | - | % (template, str(tuple(argtuple))) |
|
1017 | - | ) |
|
1013 | + | raise TypeError(f"{e}: Template {template} failed to convert " |
|
1014 | + | f"with args {tuple(argtuple)}") |
|
1018 | 1015 | outfiles = [] |
|
1019 | 1016 | for fname in bkt_files: |
|
1020 | 1017 | if re.match(filledtemplate, fname): |
@@ -1286,11 +1283,8 @@
Loading
1286 | 1283 | try: |
|
1287 | 1284 | filledtemplate = template % tuple(argtuple) |
|
1288 | 1285 | except TypeError as e: |
|
1289 | - | raise TypeError( |
|
1290 | - | e.message |
|
1291 | - | + ": Template %s failed to convert with args %s" |
|
1292 | - | % (template, str(tuple(argtuple))) |
|
1293 | - | ) |
|
1286 | + | raise TypeError(f"{e}: Template {template} failed to convert " |
|
1287 | + | f"with args {tuple(argtuple)}") |
|
1294 | 1288 | outfiles = glob.glob(filledtemplate) |
|
1295 | 1289 | if len(outfiles) == 0: |
|
1296 | 1290 | msg = "Output key: %s Template: %s returned no files" % ( |
@@ -2664,11 +2658,8 @@
Loading
2664 | 2658 | try: |
|
2665 | 2659 | filledtemplate = template % tuple(argtuple) |
|
2666 | 2660 | except TypeError as e: |
|
2667 | - | raise TypeError( |
|
2668 | - | e.message |
|
2669 | - | + ": Template %s failed to convert with args %s" |
|
2670 | - | % (template, str(tuple(argtuple))) |
|
2671 | - | ) |
|
2661 | + | raise TypeError(f"{e}: Template {template} failed to convert " |
|
2662 | + | f"with args {tuple(argtuple)}") |
|
2672 | 2663 | ||
2673 | 2664 | outputs[key].append(self._get_files_over_ssh(filledtemplate)) |
|
2674 | 2665 |
Files | Coverage |
---|---|
nipype | 64.70% |
Project Totals (302 files) | 64.70% |
1 |
coverage: |
2 |
range: "0...100" |
3 |
status: |
4 |
patch: |
5 |
default: |
6 |
target: 0 |
7 |
threshold: 100 |
8 |
project: |
9 |
default: |
10 |
target: 0 |
11 |
threshold: 100 |
12 |
patch: |
13 |
target: 0 |
14 |
threshold: 100 |
15 |
unittests: |
16 |
target: 0 |
17 |
threshold: 100 |
18 |
flags: |
19 |
- "unittests" |
20 |
smoketests: |
21 |
target: 0 |
22 |
threshold: 100 |
23 |
flags: |
24 |
- "smoketests" |
25 |
ignore: # files and folders that will be removed during processing |
26 |
- "nipype/external" |
27 |
- "tools" |
28 |
- "doc" |
29 |
- "**/tests" |
30 |
- "examples" |
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.