From f7d31b063c13558970c8ebc4a3f20de07c313386 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Fri, 7 Aug 2026 09:37:46 +0000 Subject: [PATCH] ruff C409, C410 (unnecessary list literal) --- mmgen/tx/keys.py | 2 +- pyproject.toml | 2 -- test/objattrtest_d/common.py | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/mmgen/tx/keys.py b/mmgen/tx/keys.py index dbd95320..5d6112fe 100755 --- a/mmgen/tx/keys.py +++ b/mmgen/tx/keys.py @@ -173,7 +173,7 @@ class TxKeys: if from_keyaddrlist: desc = 'key-address file' err_desc = 'From key-address file:' - kals = tuple([self.keyaddrlist]) + kals = (self.keyaddrlist,) else: desc = 'seed(s)' err_desc = 'Generated from seed:' diff --git a/pyproject.toml b/pyproject.toml index 0853a3bc..dea89f22 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,8 +21,6 @@ ignore = [ "B018", # Found useless expression. Either assign it to a variable or remove it. "B026", # Star-arg unpacking after a keyword argument is strongly discouraged "BLE001", # Do not catch blind exception: `Exception` - "C409", # Unnecessary list literal passed to `tuple()` (rewrite as a tuple literal) - "C410", # Unnecessary list literal passed to `list()` (remove the outer call to `list()`) "C414", # Unnecessary `list()` call within `set()` "C418", # Unnecessary dict literal passed to `dict()` (remove the outer call to `dict()`) "E401", # multiple imports per line diff --git a/test/objattrtest_d/common.py b/test/objattrtest_d/common.py index 9477e1b5..81ffda31 100755 --- a/test/objattrtest_d/common.py +++ b/test/objattrtest_d/common.py @@ -31,8 +31,8 @@ sample_objs = { 'bool': bool(True), 'str': str('foo'), 'dict': dict({'a': 1}), - 'list': list([1]), - 'tuple': tuple((1, 2)), + 'list': [1], + 'tuple': (1, 2), 'bytes': bytes(1), 'HexStr': HexStr('ff'),