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

BF: Use equality check instead of identity check #2139

Merged
merged 1 commit into from
Apr 22, 2020

Conversation

jhlegarreta
Copy link
Contributor

Use equality check instead of identity check.

Fixes for example

/home/vsts/work/1/s/venv/lib/python3.8/site-packages/dipy/viz/regtools.py:227:
SyntaxWarning: "is" with a literal. Did you mean "=="?
if direct_grid2world is -1:

Reported for example in
https://dev.azure.com/dipy/46625eaf-7255-4a2c-9e92-befcdbdca2a8/_apis/build/builds/310/logs/267

Use equality check instead of identity check.

Fixes for example
```
/home/vsts/work/1/s/venv/lib/python3.8/site-packages/dipy/viz/regtools.py:227:
SyntaxWarning: "is" with a literal. Did you mean "=="?
if direct_grid2world is -1:
```

Reported for example in
https://dev.azure.com/dipy/46625eaf-7255-4a2c-9e92-befcdbdca2a8/_apis/build/builds/310/logs/267
@skoudoro skoudoro added this to the 1.2 milestone Apr 22, 2020
Copy link
Member

@skoudoro skoudoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, Thanks @jhlegarreta.

Waiting for the CI's since I have a tiny small doubt for the workflows change.

@codecov
Copy link

codecov bot commented Apr 22, 2020

Codecov Report

Merging #2139 into master will increase coverage by 0.01%.
The diff coverage is 91.95%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2139      +/-   ##
==========================================
+ Coverage   91.20%   91.21%   +0.01%     
==========================================
  Files         251      251              
  Lines       32214    32229      +15     
  Branches     3401     3403       +2     
==========================================
+ Hits        29382    29399      +17     
  Misses       2091     2091              
+ Partials      741      739       -2     
Impacted Files Coverage Δ
dipy/align/imwarp.py 98.39% <ø> (ø)
dipy/align/scalespace.py 92.64% <ø> (ø)
dipy/viz/regtools.py 31.49% <0.00%> (ø)
dipy/io/stateful_tractogram.py 68.85% <50.00%> (ø)
dipy/core/gradients.py 90.47% <88.88%> (+0.04%) ⬆️
dipy/nn/model.py 92.59% <93.75%> (ø)
dipy/nn/tests/test_tf.py 88.46% <93.75%> (ø)
dipy/core/tests/test_gradients.py 98.76% <100.00%> (ø)
dipy/direction/peaks.py 83.41% <100.00%> (ø)
...ection/tests/test_closest_peak_direction_getter.py 100.00% <100.00%> (ø)
... and 16 more

@skoudoro skoudoro merged commit a1cbca1 into dipy:master Apr 22, 2020
@skoudoro
Copy link
Member

Thank you @jhlegarreta

@jhlegarreta jhlegarreta deleted the FixEqualityCheckWarnings branch April 22, 2020 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants