[GRASS-git] [OSGeo/grass] 652826: Fix comparison, membership, indentation and lambda...

Vaclav Petras noreply at github.com
Wed Apr 22 10:07:45 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass
  Commit: 6528264fc3fe4c8d9a47ccb28f35ff3d47998ba8
      https://github.com/OSGeo/grass/commit/6528264fc3fe4c8d9a47ccb28f35ff3d47998ba8
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2020-04-22 (Wed, 22 Apr 2020)

  Changed paths:
    M scripts/.flake8
    M scripts/g.extension/g.extension.py
    M scripts/g.search.modules/g.search.modules.py
    M scripts/i.oif/i.oif.py
    M scripts/i.pansharpen/i.pansharpen.py
    M scripts/r.grow/r.grow.py
    M scripts/r.in.srtm/r.in.srtm.py
    M scripts/r.in.wms/r.in.wms.py
    M scripts/r.in.wms/wms_base.py
    M scripts/r.in.wms/wms_cap_parsers.py
    M scripts/r.in.wms/wms_drv.py
    M scripts/r.mapcalc.simple/r.mapcalc.simple.py
    M scripts/r3.in.xyz/r3.in.xyz.py
    M scripts/v.db.addtable/v.db.addtable.py
    M scripts/v.db.reconnect.all/v.db.reconnect.all.py
    M scripts/v.import/v.import.py

  Log Message:
  -----------
  Fix comparison, membership, indentation and lambda Flake8 warnings in scripts (#539)

* Test for membership should be 'not in' (Flake8 E713)
* Comparison to None should be 'if cond is None:' (Flake8 E711)
* Use ==/!= to compare str, bytes, and int literals (Flake8 F632)
* Comparison to True should be... (True cases for E712)
* Comparison to False should be 'if cond is False:' or 'if not cond:' (Flake8 E712)
* Indentation is not a multiple of four (Flake8 E111)
* Blank line at end of file (Flake8 W391)
* Do not assign a lambda expression, use a def (Flake8 E731)
* Remove one entry for disabled errors listed twice




More information about the grass-commit mailing list