ruff C414 (unnecessary list() call within set())
This commit is contained in:
parent
f7d31b063c
commit
720feb60f6
3 changed files with 3 additions and 4 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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):
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue