[GRASS-git] [OSGeo/grass] c9bd9b: style: Fix if-key-in-dict-del (RUF051)

Edouard Choinière noreply at github.com
Sat Dec 14 06:33:51 PST 2024


  Branch: refs/heads/renovate/ruff
  Home:   https://github.com/OSGeo/grass
  Commit: c9bd9b45d896a8c0b23348fe816e3b6c36da9eed
      https://github.com/OSGeo/grass/commit/c9bd9b45d896a8c0b23348fe816e3b6c36da9eed
  Author: Edouard Choinière <27212526+echoix at users.noreply.github.com>
  Date:   2024-12-14 (Sat, 14 Dec 2024)

  Changed paths:
    M gui/wxpython/core/utils.py
    M python/grass/pydispatch/signal.py

  Log Message:
  -----------
  style: Fix if-key-in-dict-del (RUF051)

Ruff rule: https://docs.astral.sh/ruff/rules/if-key-in-dict-del/

When a dictionary's pop() method is used with the second argument (default value), and the second parameter is None, it removes the key from the dict, but doesn't raise a `KeyError` if it didn't exist. The value returned is None.



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