ruff C409, C410 (unnecessary list literal)

This commit is contained in:
The MMGen Project 2026-08-07 09:37:46 +00:00
commit f7d31b063c
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
3 changed files with 3 additions and 5 deletions

View file

@ -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:'

View file

@ -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

View file

@ -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'),