From 30dde17fee1fade999834a92658ef7494bb225c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Choini=C3=A8re?= <27212526+echoix@users.noreply.github.com> Date: Sun, 20 Oct 2024 13:50:35 +0000 Subject: [PATCH] style: Fix multi-value-repeated-key-literal (F601) (Pylint W0109) Ruff rule: https://docs.astral.sh/ruff/rules/multi-value-repeated-key-literal/ Pylint : https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/duplicate-key.html --- gui/wxpython/gmodeler/model.py | 1 - pyproject.toml | 1 - python/grass/script/raster.py | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/gui/wxpython/gmodeler/model.py b/gui/wxpython/gmodeler/model.py index 23e308037ff..fdf6ac63b36 100644 --- a/gui/wxpython/gmodeler/model.py +++ b/gui/wxpython/gmodeler/model.py @@ -2285,7 +2285,6 @@ def _processComments(self): "size": size, "text": text, "id": int(node.get("id", -1)), - "text": text, } ) diff --git a/pyproject.toml b/pyproject.toml index 2a2287aaaad..4e02f44ed96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -135,7 +135,6 @@ ignore = [ "F401", # unused-import "F403", # undefined-local-with-import-star "F405", # undefined-local-with-import-star-usage - "F601", # multi-value-repeated-key-literal "F811", # redefined-while-unused "F821", # undefined-name "F822", # undefined-export diff --git a/python/grass/script/raster.py b/python/grass/script/raster.py index bcaab7ef596..54c1219dbaf 100644 --- a/python/grass/script/raster.py +++ b/python/grass/script/raster.py @@ -66,7 +66,7 @@ def raster_history(map, overwrite=False, env=None): "Unable to write history for <%(map)s>. " "Raster map <%(map)s> not found in current mapset." ) - % {"map": map, "map": map} + % {"map": map} ) return False