-
Notifications
You must be signed in to change notification settings - Fork 532
FIX: report.rst terminal output #3220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3220 +/- ##
==========================================
- Coverage 64.97% 64.12% -0.85%
==========================================
Files 301 299 -2
Lines 39836 39771 -65
Branches 5270 5264 -6
==========================================
- Hits 25884 25505 -379
- Misses 12890 13218 +328
+ Partials 1062 1048 -14
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really necessary. Thanks
I'll have a look at it and let you know. Thanks! |
@@ -736,7 +736,7 @@ def write_rst_header(header, level=0): | |||
|
|||
def write_rst_list(items, prefix=""): | |||
out = [] | |||
for item in items: | |||
for item in ensure_list(items): | |||
out.append("{} {}".format(prefix, str(item))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this ensure_list()
function defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nipype/nipype/utils/filemanip.py
Lines 523 to 533 in 4c48a18
def ensure_list(filename): | |
"""Returns a list given either a string or a list | |
""" | |
if isinstance(filename, (str, bytes)): | |
return [filename] | |
elif isinstance(filename, list): | |
return filename | |
elif is_container(filename): | |
return [x for x in filename] | |
else: | |
return None |
Closes #3103
This should fix cases where terminal output (stdout / stderr) is given as a string, and each character is printed on a new line.