[GRASS-git] [OSGeo/grass] 1f6fa6: style: Fix needless-bool (SIM103) (#4055)

Edouard Choinière noreply at github.com
Sun Jul 21 10:07:35 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 1f6fa6c62e7d53f6daa980098735f73f9e3e16b8
      https://github.com/OSGeo/grass/commit/1f6fa6c62e7d53f6daa980098735f73f9e3e16b8
  Author: Edouard Choinière <27212526+echoix at users.noreply.github.com>
  Date:   2024-07-21 (Sun, 21 Jul 2024)

  Changed paths:
    M gui/wxpython/animation/nviztask.py
    M gui/wxpython/core/globalvar.py
    M gui/wxpython/core/render.py
    M gui/wxpython/core/treemodel.py
    M gui/wxpython/core/utils.py
    M gui/wxpython/dbmgr/base.py
    M gui/wxpython/gmodeler/model.py
    M gui/wxpython/gui_core/vselect.py
    M gui/wxpython/iclass/frame.py
    M gui/wxpython/iscatt/plots.py
    M gui/wxpython/location_wizard/wizard.py
    M gui/wxpython/mapdisp/gprint.py
    M gui/wxpython/mapdisp/statusbar.py
    M gui/wxpython/mapswipe/dialogs.py
    M gui/wxpython/mapwin/decorations.py
    M gui/wxpython/modules/colorrules.py
    M gui/wxpython/psmap/dialogs.py
    M gui/wxpython/rlisetup/functions.py
    M gui/wxpython/timeline/frame.py
    M gui/wxpython/tplot/frame.py
    M gui/wxpython/vdigit/wxdisplay.py
    M gui/wxpython/vnet/vnet_data.py
    M gui/wxpython/vnet/widgets.py
    M gui/wxpython/web_services/cap_interface.py
    M gui/wxpython/web_services/widgets.py
    M lib/init/grass.py
    M man/build_class_graphical.py
    M man/build_manual_gallery.py
    M pyproject.toml
    M python/grass/app/data.py
    M python/grass/grassdb/checks.py
    M python/grass/grassdb/data.py
    M python/grass/gunittest/checkers.py
    M python/grass/gunittest/gutils.py
    M python/grass/pygrass/utils.py
    M python/grass/script/core.py
    M python/grass/temporal/abstract_dataset.py
    M python/grass/temporal/base.py
    M python/grass/temporal/spatial_extent.py
    M python/grass/temporal/temporal_extent.py
    M python/grass/temporal/temporal_granularity.py
    M scripts/g.search.modules/g.search.modules.py
    M scripts/r.in.wms/wms_cap_parsers.py
    M scripts/r.in.wms/wms_drv.py
    M scripts/r.tileset/r.tileset.py

  Log Message:
  -----------
  style: Fix needless-bool (SIM103) (#4055)

* style: Fix needless-bool (SIM103)

Return the condition directly
Ruff rule: https://docs.astral.sh/ruff/rules/needless-bool/

Added bool return type annotations when possible to confirm no other type was possible on changed functions

* Update frame.py

* Apply suggestions from code review

Co-authored-by: Edouard Choinière <27212526+echoix at users.noreply.github.com>

* style: Merge more if conditions per review

---------

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