[GRASS-git] [OSGeo/grass] fb0165: CQ: Fix Ruff PTH110: `os.path.exists()` should be ...

Edouard Choinière noreply at github.com
Tue Oct 21 06:57:37 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: fb0165c2d021b7700528aca09c224847be871729
      https://github.com/OSGeo/grass/commit/fb0165c2d021b7700528aca09c224847be871729
  Author: Edouard Choinière <27212526+echoix at users.noreply.github.com>
  Date:   2025-10-21 (Tue, 21 Oct 2025)

  Changed paths:
    M display/d.mon/render_cmd.py
    M gui/wxpython/animation/data.py
    M gui/wxpython/animation/dialogs.py
    M gui/wxpython/animation/provider.py
    M gui/wxpython/core/gconsole.py
    M gui/wxpython/core/globalvar.py
    M gui/wxpython/core/render.py
    M gui/wxpython/core/settings.py
    M gui/wxpython/core/toolboxes.py
    M gui/wxpython/core/utils.py
    M gui/wxpython/core/watchdog.py
    M gui/wxpython/gcp/manager.py
    M gui/wxpython/gmodeler/panels.py
    M gui/wxpython/gui_core/ghelp.py
    M gui/wxpython/gui_core/menu.py
    M gui/wxpython/gui_core/pyedit.py
    M gui/wxpython/gui_core/widgets.py
    M gui/wxpython/iclass/frame.py
    M gui/wxpython/icons/icon.py
    M gui/wxpython/image2target/ii2t_gis_set.py
    M gui/wxpython/image2target/ii2t_manager.py
    M gui/wxpython/lmgr/frame.py
    M gui/wxpython/lmgr/workspace.py
    M gui/wxpython/main_window/frame.py
    M gui/wxpython/modules/colorrules.py
    M gui/wxpython/modules/import_export.py
    M gui/wxpython/nviz/tools.py
    M gui/wxpython/photo2image/ip2i_manager.py
    M gui/wxpython/psmap/dialogs.py
    M gui/wxpython/psmap/instructions.py
    M gui/wxpython/rlisetup/functions.py
    M gui/wxpython/startup/locdownload.py
    M gui/wxpython/tplot/frame.py
    M gui/wxpython/wxplot/profile.py
    M imagery/i.cluster/testsuite/test_i_cluster.py
    M imagery/i.landsat.toar/testsuite/test_i_landsat_toar.py
    M imagery/i.rectify/testsuite/test_i_rectify.py
    M imagery/i.target/testsuite/test_i_target.py
    M lib/gis/testsuite/test_gis_lib_getl.py
    M lib/init/grass.py
    M locale/grass_po_stats.py
    M man/build.py
    M man/build_rest.py
    M pyproject.toml
    M python/grass/app/data.py
    M python/grass/app/runtime.py
    M python/grass/app/tests/grass_app_resource_paths_test.py
    M python/grass/experimental/create.py
    M python/grass/experimental/tests/grass_script_mapset_session_test.py
    M python/grass/experimental/tests/grass_script_tmp_mapset_session_test.py
    M python/grass/grassdb/checks.py
    M python/grass/gunittest/invoker.py
    M python/grass/gunittest/main.py
    M python/grass/gunittest/multireport.py
    M python/grass/gunittest/utils.py
    M python/grass/jupyter/map.py
    M python/grass/jupyter/tests/grass_jupyter_session_test.py
    M python/grass/pygrass/vector/__init__.py
    M python/grass/pygrass/vector/table.py
    M python/grass/script/core.py
    M python/grass/script/tests/grass_script_create_project_pack_test.py
    M python/grass/script/tests/grass_script_setup_test.py
    M python/grass/script/utils.py
    M python/grass/temporal/core.py
    M python/grass/temporal/stds_import.py
    M python/grass/tools/tests/conftest.py
    M python/grass/tools/tests/grass_tools_session_tools_pack_test.py
    M python/grass/utils/download.py
    M raster/r.in.pdal/testsuite/test_r_in_pdal_binning.py
    M raster/r.in.pdal/testsuite/test_r_in_pdal_print.py
    M raster/r.in.pdal/testsuite/test_r_in_pdal_selection.py
    M raster/r.kappa/testsuite/test_r_kappa.py
    M raster/r.smooth.edgepreserve/testsuite/test_r_smooth_edgepreserve.py
    M raster/r.terraflow/testsuite/test_r_terraflow.py
    M scripts/d.polar/d.polar.py
    M scripts/db.out.ogr/db.out.ogr.py
    M scripts/g.extension.all/g.extension.all.py
    M scripts/g.extension/g.extension.py
    M scripts/g.extension/testsuite/test_addons_modules.py
    M scripts/g.manual/g.manual.py
    M scripts/i.oif/testsuite/test_i_oif.py
    M scripts/m.proj/m.proj.py
    M scripts/r.import/r.import.py
    M scripts/r.in.wms/wms_cap_parsers.py
    M scripts/r.pack/r.pack.py
    M scripts/r.pack/tests/r_pack_test.py
    M scripts/r.unpack/r.unpack.py
    M scripts/r3.in.xyz/r3.in.xyz.py
    M scripts/v.in.e00/v.in.e00.py
    M scripts/v.in.lines/v.in.lines.py
    M scripts/v.in.wfs/v.in.wfs.py
    M scripts/v.pack/v.pack.py
    M scripts/v.unpack/v.unpack.py
    M temporal/t.rast.export/t.rast.export.py
    M temporal/t.rast.out.vtk/t.rast.out.vtk.py
    M utils/create_python_init_file.py
    M utils/merge_sitemaps.py
    M utils/mkdocs.py
    M utils/mkhtml.py
    M utils/mkmarkdown.py
    M utils/test_generate_last_commit_file.py
    M utils/thumbnails.py

  Log Message:
  -----------
  CQ: Fix Ruff PTH110: `os.path.exists()` should be replaced by `Path.exists()` (#6524)

* CQ: Fix Ruff PTH110: `os.path.exists()` should be replaced by `Path.exists()`

Ruff rule: https://docs.astral.sh/ruff/rules/os-path-exists/

* Update grass.py, grass_script_create_project_pack_test.py, d.polar.py, r_pack_test.py, create_python_init_file.py, globalvar.py, lib/init/grass.py

Co-authored-by: Stefan Blumentrath <stefan.blumentrath at gmx.de>

* Update gui/wxpython/wxplot/profile.py

* Update profile.py

* Apply suggestions from code review for os.path.join

* r.pack: Revert changes for a test that returns a permission error instead of checking if exists or not

* Add typing to python/grass/tools/tests/conftest.py for tmp_path_factory

* Remove wrapping pathlib.Path objects when they are already given in argument as a pathlib.Path in python/grass/tools/tests/grass_tools_session_tools_pack_test.py

---------

Co-authored-by: Stefan Blumentrath <stefan.blumentrath at gmx.de>



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