[GRASS-git] [OSGeo/grass] 0d9e96: Apply Black to all scripts (#1347)

Vaclav Petras noreply at github.com
Thu Feb 18 08:35:36 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass
  Commit: 0d9e966dd289753cca91886529e65711eaf863eb
      https://github.com/OSGeo/grass/commit/0d9e966dd289753cca91886529e65711eaf863eb
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2021-02-18 (Thu, 18 Feb 2021)

  Changed paths:
    A .github/workflows/black.yml
    M scripts/.flake8
    M scripts/d.correlate/d.correlate.py
    M scripts/d.frame/d.frame.py
    M scripts/d.out.file/d.out.file.py
    M scripts/d.polar/d.polar.py
    M scripts/d.polar/testsuite/test_d_polar.py
    M scripts/d.rast.edit/d.rast.edit.py
    M scripts/d.rast.leg/d.rast.leg.py
    M scripts/d.redraw/d.redraw.py
    M scripts/d.shade/d.shade.py
    M scripts/d.to.rast/d.to.rast.py
    M scripts/d.what.rast/d.what.rast.py
    M scripts/d.what.vect/d.what.vect.py
    M scripts/db.dropcolumn/db.dropcolumn.py
    M scripts/db.dropcolumn/testsuite/test_db_dropcolumn.py
    M scripts/db.droptable/db.droptable.py
    M scripts/db.droptable/testsuite/test_db_droptable.py
    M scripts/db.in.ogr/db.in.ogr.py
    M scripts/db.in.ogr/testsuite/test_db_in_ogr.py
    M scripts/db.out.ogr/db.out.ogr.py
    M scripts/db.test/db.test.py
    M scripts/db.univar/db.univar.py
    M scripts/db.univar/testsuite/test_db_univar.py
    M scripts/g.bands/g.bands.py
    M scripts/g.bands/testsuite/test_g_bands.py
    M scripts/g.extension.all/g.extension.all.py
    M scripts/g.extension/g.extension.py
    M scripts/g.extension/testsuite/data/sample_modules/r.plus.example/r.plus.example.py
    M scripts/g.extension/testsuite/test_addons_modules.py
    M scripts/g.extension/testsuite/test_addons_toolboxes.py
    M scripts/g.manual/g.manual.py
    M scripts/g.search.modules/g.search.modules.py
    M scripts/g.search.modules/testsuite/test_g_search_modules.py
    M scripts/i.band/i.band.py
    M scripts/i.band/testsuite/test_i_band.py
    M scripts/i.colors.enhance/i.colors.enhance.py
    M scripts/i.image.mosaic/i.image.mosaic.py
    M scripts/i.in.spotvgt/i.in.spotvgt.py
    M scripts/i.oif/i.oif.py
    M scripts/i.pansharpen/i.pansharpen.py
    M scripts/i.spectral/i.spectral.py
    M scripts/i.tasscap/i.tasscap.py
    M scripts/m.proj/m.proj.py
    M scripts/r.blend/r.blend.py
    M scripts/r.blend/testsuite/test_r_blend.py
    M scripts/r.blend/testsuite/test_r_blend_quoting.py
    M scripts/r.buffer.lowmem/r.buffer.lowmem.py
    M scripts/r.colors.stddev/r.colors.stddev.py
    M scripts/r.drain/r.drain.py
    M scripts/r.fillnulls/r.fillnulls.py
    M scripts/r.fillnulls/testsuite/test_r_fillnulls.py
    M scripts/r.grow/r.grow.py
    M scripts/r.grow/testsuite/test_r_grow.py
    M scripts/r.grow/testsuite/test_r_grow_quoting.py
    M scripts/r.import/r.import.py
    M scripts/r.import/testsuite/test_r_import.py
    M scripts/r.in.aster/r.in.aster.py
    M scripts/r.in.srtm/r.in.srtm.py
    M scripts/r.in.wms/r.in.wms.py
    M scripts/r.in.wms/srs.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.in.wms/wms_gdal_drv.py
    M scripts/r.mapcalc.simple/r.mapcalc.simple.py
    M scripts/r.mapcalc.simple/testsuite/test_rmapcalcsimple.py
    M scripts/r.mask/r.mask.py
    M scripts/r.mask/testsuite/test_r_mask.py
    M scripts/r.out.xyz/r.out.xyz.py
    M scripts/r.out.xyz/testsuite/test_r_out_xyz.py
    M scripts/r.pack/r.pack.py
    M scripts/r.pack/testsuite/test_r_pack.py
    M scripts/r.plane/r.plane.py
    M scripts/r.plane/testsuite/test_r_plane.py
    M scripts/r.reclass.area/r.reclass.area.py
    M scripts/r.reclass.area/testsuite/test_r_reclass_area.py
    M scripts/r.reclass.area/testsuite/testrra.py
    M scripts/r.rgb/r.rgb.py
    M scripts/r.rgb/testsuite/test_r_rgb.py
    M scripts/r.shade/r.shade.py
    M scripts/r.shade/testsuite/test_r_shade.py
    M scripts/r.tileset/r.tileset.py
    M scripts/r.tileset/testsuite/test_r_tileset.py
    M scripts/r.unpack/r.unpack.py
    M scripts/r3.in.xyz/r3.in.xyz.py
    M scripts/v.build.all/v.build.all.py
    M scripts/v.centroids/testsuite/test_v_centroids.py
    M scripts/v.centroids/v.centroids.py
    M scripts/v.clip/testsuite/test_v_clip.py
    M scripts/v.clip/v.clip.py
    M scripts/v.db.addcolumn/testsuite/test_v_db_addcolumn.py
    M scripts/v.db.addcolumn/v.db.addcolumn.py
    M scripts/v.db.addtable/testsuite/test_v_db_addtable.py
    M scripts/v.db.addtable/v.db.addtable.py
    M scripts/v.db.dropcolumn/testsuite/test_v_db_dropcolumn.py
    M scripts/v.db.dropcolumn/v.db.dropcolumn.py
    M scripts/v.db.droprow/testsuite/test_v_db_droprow.py
    M scripts/v.db.droprow/v.db.droprow.py
    M scripts/v.db.droptable/testsuite/test_v_db_droptable.py
    M scripts/v.db.droptable/v.db.droptable.py
    M scripts/v.db.join/v.db.join.py
    M scripts/v.db.reconnect.all/v.db.reconnect.all.py
    M scripts/v.db.renamecolumn/testsuite/test_v_db_renamecolumn.py
    M scripts/v.db.renamecolumn/v.db.renamecolumn.py
    M scripts/v.db.univar/testsuite/test_v_db_univar.py
    M scripts/v.db.univar/v.db.univar.py
    M scripts/v.db.update/testsuite/test_v_db_update.py
    M scripts/v.db.update/v.db.update.py
    M scripts/v.dissolve/testsuite/test_v_dissolve.py
    M scripts/v.dissolve/v.dissolve.py
    M scripts/v.import/v.import.py
    M scripts/v.in.e00/v.in.e00.py
    M scripts/v.in.geonames/v.in.geonames.py
    M scripts/v.in.lines/v.in.lines.py
    M scripts/v.in.mapgen/v.in.mapgen.py
    M scripts/v.in.wfs/v.in.wfs.py
    M scripts/v.pack/testsuite/test_v_pack.py
    M scripts/v.pack/v.pack.py
    M scripts/v.rast.stats/testsuite/test_v_rast_stats.py
    M scripts/v.rast.stats/v.rast.stats.py
    M scripts/v.report/v.report.py
    M scripts/v.to.lines/testsuite/test_v_to_lines.py
    M scripts/v.to.lines/v.to.lines.py
    M scripts/v.unpack/testsuite/test_v_unpack.py
    M scripts/v.unpack/v.unpack.py
    M scripts/v.what.strds/testsuite/test_what_strds.py
    M scripts/v.what.strds/v.what.strds.py
    M scripts/v.what.vect/testsuite/test_v_what_vect.py
    M scripts/v.what.vect/v.what.vect.py
    M scripts/wxpyimgview/wxpyimgview.py
    M scripts/wxpyimgview/wxpyimgview_gui.py

  Log Message:
  -----------
  Apply Black to all scripts (#1347)

This applies Black 20.8b1 to all Python modules in scripts
and adds an action which checks the formatting and produces diff if needed.

It modifies the .flake8 file so that Flake8 ignores an error which
is considered to be a false positive (PEP8 says 'in a slice the colon acts like a binary operator'
and thus suggests/allows spaces around it while Flake8 marks that as an error
as if it would be a colon in if or for.

Also change comments into docstrings in the g.bands test.




More information about the grass-commit mailing list