[GRASS-git] [OSGeo/grass] fd945a: style: Enable flake8-errmsg rules and fix errors (...

Edouard Choinière noreply at github.com
Fri Dec 20 11:59:07 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: fd945aeb2371b5e9f4fed78d0fa2ec6057ff774b
      https://github.com/OSGeo/grass/commit/fd945aeb2371b5e9f4fed78d0fa2ec6057ff774b
  Author: Edouard Choinière <27212526+echoix at users.noreply.github.com>
  Date:   2024-12-20 (Fri, 20 Dec 2024)

  Changed paths:
    M gui/wxpython/animation/data.py
    M gui/wxpython/core/globalvar.py
    M gui/wxpython/core/layerlist.py
    M gui/wxpython/core/utils.py
    M gui/wxpython/gmodeler/model.py
    M gui/wxpython/gui_core/mapdisp.py
    M gui/wxpython/iscatt/plots.py
    M gui/wxpython/lmgr/frame.py
    M gui/wxpython/main_window/frame.py
    M lib/gis/testsuite/test_gis_lib_getl.py
    M lib/init/grass.py
    M pyproject.toml
    M python/grass/app/runtime.py
    M python/grass/benchmark/app.py
    M python/grass/benchmark/plots.py
    M python/grass/experimental/create.py
    M python/grass/experimental/mapset.py
    M python/grass/grassdb/history.py
    M python/grass/gunittest/case.py
    M python/grass/gunittest/checkers.py
    M python/grass/gunittest/invoker.py
    M python/grass/gunittest/main.py
    M python/grass/gunittest/testsuite/data/samplecode/submodule_errors/subsubmodule_errors/testsuite/test_error.py
    M python/grass/gunittest/testsuite/data/samplecode/testsuite/test_good_and_bad.py
    M python/grass/imaging/images2avi.py
    M python/grass/imaging/images2gif.py
    M python/grass/imaging/images2ims.py
    M python/grass/imaging/images2swf.py
    M python/grass/jupyter/map.py
    M python/grass/jupyter/seriesmap.py
    M python/grass/jupyter/timeseriesmap.py
    M python/grass/pygrass/gis/__init__.py
    M python/grass/pygrass/gis/region.py
    M python/grass/pygrass/modules/interface/docstring.py
    M python/grass/pygrass/modules/interface/env.py
    M python/grass/pygrass/modules/interface/module.py
    M python/grass/pygrass/modules/interface/parameter.py
    M python/grass/pygrass/raster/__init__.py
    M python/grass/pygrass/raster/abstract.py
    M python/grass/pygrass/raster/category.py
    M python/grass/pygrass/raster/rowio.py
    M python/grass/pygrass/rpc/base.py
    M python/grass/pygrass/utils.py
    M python/grass/pygrass/vector/__init__.py
    M python/grass/pygrass/vector/abstract.py
    M python/grass/pygrass/vector/basic.py
    M python/grass/pygrass/vector/geometry.py
    M python/grass/pygrass/vector/table.py
    M python/grass/script/core.py
    M python/grass/script/imagery.py
    M python/grass/script/setup.py
    M python/grass/script/utils.py
    M python/grass/semantic_label/reader.py
    M python/grass/temporal/abstract_map_dataset.py
    M python/grass/temporal/datetime_math.py
    M python/grass/temporal/list_stds.py
    M python/grass/temporal/temporal_algebra.py
    M scripts/db.univar/db.univar.py
    M scripts/g.extension/testsuite/test_addons_download.py
    M scripts/g.extension/testsuite/test_addons_modules.py
    M scripts/v.dissolve/v.dissolve.py
    M scripts/v.dissolve/v_dissolve.ipynb
    M scripts/wxpyimgview/wxpyimgview_gui.py
    M utils/g.html2man/rest.py
    M utils/generate_release_notes.py
    M utils/ppmrotate.py

  Log Message:
  -----------
  style: Enable flake8-errmsg rules and fix errors (#4845)

* style: Fix raw-string-in-exception (EM101)

Exception must not use a string literal, assign to variable first

Produces a clearer stack trace, without duplicating the text of the error message

Ruff rule: https://docs.astral.sh/ruff/rules/raw-string-in-exception/

* style: Fix f-string-in-exception (EM102)
Exception must not use an f-string literal, assign to variable first

Produces a clearer stack trace, without duplicating the text of the error message

Ruff rule: https://docs.astral.sh/ruff/rules/f-string-in-exception/

* style: Fix dot-format-in-exception (EM103)
Exception must not use a `.format()` string directly, assign to variable first

Produces a clearer stack trace, without duplicating the text of the error message

Ruff rule: https://docs.astral.sh/ruff/rules/dot-format-in-exception/

* checks(ruff): Enable checking for EM101, EM102 and EM103 rules

* Fix doctest typo according to current error message



To unsubscribe from these emails, change your notification settings at https://github.com/OSGeo/grass/settings/notifications


More information about the grass-commit mailing list