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

[Bug] SyntaxWarning: "is" with a literal. Did you mean "=="? if value is '': #397

Closed
jidanni opened this issue Mar 4, 2020 · 1 comment

Comments

@jidanni
Copy link
Contributor

jidanni commented Mar 4, 2020

Seen on Debian upgrade:

/usr/lib/grass78/etc/python/grass/pygrass/gis/__init__.py:75: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if value is '':
/usr/lib/grass78/etc/python/grass/temporal/core.py:65: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if do_profiling is "True" or do_profiling is "1":
/usr/lib/grass78/etc/python/grass/temporal/core.py:65: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if do_profiling is "True" or do_profiling is "1":
/usr/lib/grass78/etc/python/grass/temporal/core.py:582: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if driver_string is not None and driver_string is not "":
/usr/lib/grass78/etc/python/grass/temporal/temporal_algebra.py:2295: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if map_i.get_type() is "raster" or map_i.get_type() is "raster3d":
/usr/lib/grass78/etc/python/grass/temporal/temporal_algebra.py:2295: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if map_i.get_type() is "raster" or map_i.get_type() is "raster3d":
/usr/lib/grass78/gui/wxpython/core/gconsole.py:600: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if line[0] is '#' and line[1] is '%':
/usr/lib/grass78/gui/wxpython/core/gconsole.py:600: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if line[0] is '#' and line[1] is '%':
/usr/lib/grass78/gui/wxpython/dbmgr/vinfo.py:170: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if where is None or where is '':
/usr/lib/grass78/gui/wxpython/gmodeler/model.py:261: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if not mapName or mapName[0] is '%':
/usr/lib/grass78/gui/wxpython/gui_core/gselect.py:1868: SyntaxWarning: "is" with a literal. Did you mean "=="?
  self.changingSizer.Show(self.dbPanel, show=(sourceType is 'db'))
/usr/lib/grass78/gui/wxpython/location_wizard/wizard.py:1306: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.scope is 'earth':
@petrasovaa
Copy link
Contributor

This seems to be fixed in 78 branch already.

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

2 participants