Skip to content
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

[MRG] use Template.safe_substitute instead of str.replace #1901

Merged

Conversation

jeromedockes
Copy link
Member

as was requested somewhere in the discussion of #1766 . this is purely cosmetic

#1766 (comment)

for interactive plotting html templates
@bthirion
Copy link
Member

LGTM --though I don't know this part of the codebase well.

@jeromedockes jeromedockes changed the title use Template.safe_substitute instead of str.replace [MRG] use Template.safe_substitute instead of str.replace Jan 22, 2019
@codecov
Copy link

codecov bot commented Jan 30, 2019

Codecov Report

Merging #1901 into master will increase coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1901      +/-   ##
==========================================
+ Coverage   95.23%   95.33%   +0.09%     
==========================================
  Files         135      135              
  Lines       17321    17880     +559     
==========================================
+ Hits        16496    17046     +550     
- Misses        825      834       +9
Impacted Files Coverage Δ
nilearn/plotting/html_surface.py 100% <100%> (ø) ⬆️
nilearn/plotting/js_plotting_utils.py 98.63% <100%> (+0.02%) ⬆️
nilearn/plotting/html_stat_map.py 98.64% <100%> (-0.01%) ⬇️
nilearn/plotting/html_connectome.py 100% <100%> (ø) ⬆️
nilearn/tests/test_init.py 94.87% <0%> (-5.13%) ⬇️
nilearn/plotting/tests/test_img_plotting.py 100% <0%> (ø) ⬆️
nilearn/plotting/tests/test_displays.py 100% <0%> (ø) ⬆️
...earn/input_data/tests/test_nifti_spheres_masker.py 100% <0%> (ø) ⬆️
nilearn/input_data/nifti_spheres_masker.py 96.55% <0%> (+0.86%) ⬆️
nilearn/plotting/displays.py 95.88% <0%> (+0.86%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b841c90...93bed9c. Read the comment docs.

@kchawla-pi
Copy link
Collaborator

For future perusers of this PR/codebase, the 4sentences that explain the benefit & pitfalls are worth reading. https://docs.python.org/2/library/string.html#string.Template.safe_substitute

@kchawla-pi
Copy link
Collaborator

@jeromedockes I will merge this tomorrow; doesn't seem anything more needs to be done here.

@kchawla-pi kchawla-pi merged commit ed86f29 into nilearn:master Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants