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 Python 3.8 SyntaxWarning: "is not" with a literal #182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ensarkarabudak
Copy link

/usr/lib/python3/dist-packages/gitsome/github.py:792: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  ('/' + language if language is not 'overall' else '') +

This is a new warning added in Python 3.8. From the release notes:

The compiler now produces a SyntaxWarning when identity checks (is and is not) are used with certain types of literals (e.g. strings, numbers). These can often work by accident in CPython, but are not guaranteed by the language spec. The warning advises users to use equality tests (== and !=) instead. (Contributed by Serhiy Storchaka in bpo-34850.)

/usr/lib/python3/dist-packages/gitsome/github.py:792: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  ('/' + language if language is not 'overall' else '') +
@codecov-io
Copy link

Codecov Report

Merging #182 (93a60b6) into master (d7c57ab) will decrease coverage by 41.80%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master     #182       +/-   ##
===========================================
- Coverage   95.09%   53.28%   -41.81%     
===========================================
  Files          34       86       +52     
  Lines        2119     6585     +4466     
===========================================
+ Hits         2015     3509     +1494     
- Misses        104     3076     +2972     

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.

None yet

3 participants