ruff C414 (unnecessary list() call within set())

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

View file

@ -25,10 +25,10 @@ from collections import namedtuple
from .util import die
def is_b58_str(s):
return set(list(s)) <= set(baseconv('b58').digits)
return set(s) <= set(baseconv('b58').digits)
def is_b32_str(s):
return set(list(s)) <= set(baseconv('b32').digits)
return set(s) <= set(baseconv('b32').digits)
def is_mmgen_mnemonic(s):
try:

View file

@ -381,7 +381,7 @@ class MMGenLabel(HiliteStr, InitErrors):
if cls.first_char and s and not s[0] in cls.first_char:
raise ValueError('first character not in set ' + ' '.join(cls.first_char))
if cls.allowed and not set(list(s)).issubset(set(cls.allowed)):
if cls.allowed and not set(s).issubset(set(cls.allowed)):
raise ValueError('contains symbols not in set: ' + ' '.join(cls.allowed))
if cls.forbidden and any(ch in s for ch in cls.forbidden):

View file

@ -21,7 +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`
"C414", # Unnecessary `list()` call within `set()`
"C418", # Unnecessary dict literal passed to `dict()` (remove the outer call to `dict()`)
"E401", # multiple imports per line
"E402", # module import not top of file