Skip to content

Fix Python 3.8 SyntaxWarning: "is not" with a literal#182

Open
ensarkarabudak wants to merge 1 commit into
donnemartin:masterfrom
ensarkarabudak:patch-1
Open

Fix Python 3.8 SyntaxWarning: "is not" with a literal#182
ensarkarabudak wants to merge 1 commit into
donnemartin:masterfrom
ensarkarabudak:patch-1

Conversation

@ensarkarabudak

Copy link
Copy Markdown
/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
Copy Markdown

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     

@codecov-commenter

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

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.

4 participants