-
Notifications
You must be signed in to change notification settings - Fork 530
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
FIX: Mark strings containing regex escapes as raw #3106
Conversation
@@ -474,15 +474,16 @@ def _make_matlab_command(self, _): | |||
script += "condnames=names;\n" | |||
else: | |||
if self.inputs.use_derivs: | |||
script += "pat = 'Sn\([0-9]*\) (.*)';\n" | |||
script += r"pat = 'Sn\([0-9]*\) (.*)';" "\n" |
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.
Hopefully we test these. I'm less comfortable with these, since they need to work when written to MATLAB scripts.
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.
as long as we are still running the spm workflows.
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.
Codecov doesn't seem to hit them.
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.
I've tested:
>>> a = ""
>>> a += r"\s+" "\nnextline"
>>> print(a)
\s+
nextline
So rawstring/string concatenation works fine, and the +=
is lower precedence, so I'm reasonably confident in this change.
Merging.
Codecov Report
@@ Coverage Diff @@
## master #3106 +/- ##
==========================================
+ Coverage 67.23% 67.83% +0.59%
==========================================
Files 294 295 +1
Lines 39245 39263 +18
Branches 5162 5172 +10
==========================================
+ Hits 26386 26633 +247
+ Misses 12185 11924 -261
- Partials 674 706 +32
Continue to review full report at Codecov.
|
@@ -189,7 +189,7 @@ def dipy_to_nipype_interface(cls_name, dipy_flow, BaseClass=DipyBaseInterface): | |||
parser = IntrospectiveArgumentParser() | |||
flow = dipy_flow() | |||
parser.add_workflow(flow) | |||
default_values = inspect.getargspec(flow.run).defaults | |||
default_values = inspect.getfullargspec(flow.run).defaults |
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.
Guess I fixed another deprecation warning. This works for all Py3.
Anybody up for a review? |
in general looks fine to me. |
Summary
Ran into some deprecation errors working on #3099. The escape characters were easy to handle.
Acknowledgment