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

SyntaxWarning: "is" with a literal #88

Closed
ghost opened this issue Dec 22, 2020 · 1 comment
Closed

SyntaxWarning: "is" with a literal #88

ghost opened this issue Dec 22, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 22, 2020

len(val) is 0 should be replaced by len(val) == 0

kraken-app | /venv/lib/python3.8/site-packages/prettytable/prettytable.py:421: SyntaxWarning: "is" with a literal. Did you mean "=="?
kraken-app |   elif val is None or (isinstance(val, dict) and len(val) is 0):
kraken-app | /venv/lib/python3.8/site-packages/prettytable/prettytable.py:441: SyntaxWarning: "is" with a literal. Did you mean "=="?
kraken-app |   elif val is None or (isinstance(val, dict) and len(val) is 0):
kraken-app | /venv/lib/python3.8/site-packages/prettytable/prettytable.py:459: SyntaxWarning: "is" with a literal. Did you mean "=="?
kraken-app |   if val is None or (isinstance(val, dict) and len(val) is 0):
kraken-app | /venv/lib/python3.8/site-packages/prettytable/prettytable.py:476: SyntaxWarning: "is" with a literal. Did you mean "=="?
kraken-app |   if val is None or (isinstance(val, dict) and len(val) is 0):
kraken-app | /venv/lib/python3.8/site-packages/prettytable/prettytable.py:674: SyntaxWarning: "is" with a literal. Did you mean "=="?
kraken-app |   if val is None or (isinstance(val, dict) and len(val) is 0):
kraken-app | /venv/lib/python3.8/site-packages/prettytable/prettytable.py:691: SyntaxWarning: "is" with a literal. Did you mean "=="?
kraken-app |   if val is None or (isinstance(val, dict) and len(val) is 0):
@hugovk
Copy link
Member

hugovk commented Dec 22, 2020

This was fixed in 2eb098a and released in version 1.0.0 (2020-10-04). Please upgrade :)

@hugovk hugovk closed this as completed Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant