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: Fix string literal comparison warning #2162

Merged

Conversation

jhlegarreta
Copy link
Contributor

Fix string literal comparison warning.

Fixes

/home/vsts/work/1/s/venv/lib/python3.8/site-packages/dipy/reconst/qtdmri.py:157:
SyntaxWarning: "is not" with a literal. Did you mean "!="?

  if laplacian_weighting is not 'GCV':

/home/vsts/work/1/s/venv/lib/python3.8/site-packages/dipy/reconst/qtdmri.py:175:
SyntaxWarning: "is not" with a literal. Did you mean "!="?

  if l1_weighting is not 'CV'

raised for example in:
https://dev.azure.com/dipy/dipy/_build/results?buildId=399&view=logs&j=d9aefae6-c332-51b5-d933-a85009f5a2ac&t=10ba5eab-67e4-5f58-2aec-60b4dbb37e45&l=1926

Fix string literal comparison warning.

Fixes
```
/home/vsts/work/1/s/venv/lib/python3.8/site-packages/dipy/reconst/qtdmri.py:157:
SyntaxWarning: "is not" with a literal. Did you mean "!="?

  if laplacian_weighting is not 'GCV':

/home/vsts/work/1/s/venv/lib/python3.8/site-packages/dipy/reconst/qtdmri.py:175:
SyntaxWarning: "is not" with a literal. Did you mean "!="?

  if l1_weighting is not 'CV'
```

raised for example in:
https://dev.azure.com/dipy/dipy/_build/results?buildId=399&view=logs&j=d9aefae6-c332-51b5-d933-a85009f5a2ac&t=10ba5eab-67e4-5f58-2aec-60b4dbb37e45&l=1926
@codecov
Copy link

codecov bot commented May 2, 2020

Codecov Report

Merging #2162 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2162   +/-   ##
=======================================
  Coverage   91.28%   91.28%           
=======================================
  Files         251      251           
  Lines       32413    32421    +8     
  Branches     3419     3420    +1     
=======================================
+ Hits        29587    29595    +8     
  Misses       2085     2085           
  Partials      741      741           
Impacted Files Coverage Δ
dipy/reconst/tests/test_multi_voxel.py 99.19% <ø> (-0.02%) ⬇️
dipy/reconst/qtdmri.py 93.94% <100.00%> (ø)
dipy/segment/bundles.py 89.09% <100.00%> (ø)
dipy/segment/tests/test_clustering.py 99.38% <100.00%> (ø)
dipy/workflows/stats.py 85.76% <100.00%> (+0.05%) ⬆️
dipy/reconst/tests/test_sfm.py 98.77% <0.00%> (+0.05%) ⬆️
dipy/reconst/sfm.py 92.22% <0.00%> (+0.08%) ⬆️

@skoudoro skoudoro added this to the 1.2 milestone May 2, 2020
@skoudoro
Copy link
Member

skoudoro commented May 2, 2020

thank you @jhlegarreta

@skoudoro skoudoro merged commit 6aa2a6a into dipy:master May 2, 2020
@jhlegarreta jhlegarreta deleted the FixStringLiteralComparisonWarning branch May 2, 2020 19:38
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