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

fix: Use ==/!= to compare str, bytes, and int literals #6359

Merged
merged 2 commits into from Aug 13, 2019

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Aug 13, 2019

Identity is not the same thing as equality in Python.

$ python

>>> format = "JPE"
>>> format += "G"
>>> format == "JPEG"
True
>>> format is "JPEG"
False

Identity is not the same thing as equality in Python.

$ __python__
```
>>> format = "JPE"
>>> format += "G"
>>> format == "JPEG"
True
>>> format is "JPEG"
False
```
@iamareebjamal iamareebjamal changed the title Use ==/!= to compare str, bytes, and int literals fix: Use ==/!= to compare str, bytes, and int literals Aug 13, 2019
@auto-label auto-label bot added the fix label Aug 13, 2019
@codecov
Copy link

codecov bot commented Aug 13, 2019

Codecov Report

Merging #6359 into development will not change coverage.
The diff coverage is 50%.

Impacted file tree graph

@@             Coverage Diff              @@
##           development    #6359   +/-   ##
============================================
  Coverage        65.39%   65.39%           
============================================
  Files              287      287           
  Lines            14729    14729           
============================================
  Hits              9632     9632           
  Misses            5097     5097
Impacted Files Coverage Δ
app/api/helpers/files.py 62.82% <50%> (ø) ⬆️

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 99d9694...edd0351. Read the comment docs.

@iamareebjamal iamareebjamal merged commit 9bb9f68 into fossasia:development Aug 13, 2019
@cclauss cclauss deleted the patch-2 branch August 13, 2019 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants