misc: silence incorrect style complaints

This commit is contained in:
Peter F. Patel-Schneider 2022-04-04 07:34:56 -04:00
parent 0e1522aa62
commit 509c68ba05
1 changed files with 2 additions and 2 deletions

View File

@ -119,12 +119,12 @@ class NamedInts:
self._fallback = None self._fallback = None
@classmethod @classmethod
def list(cls, items, name_generator=lambda x: str(x)): def list(cls, items, name_generator=lambda x: str(x)): # noqa: B008
values = {name_generator(x): x for x in items} values = {name_generator(x): x for x in items}
return NamedInts(**values) return NamedInts(**values)
@classmethod @classmethod
def range(cls, from_value, to_value, name_generator=lambda x: str(x), step=1): def range(cls, from_value, to_value, name_generator=lambda x: str(x), step=1): # noqa: B008
values = {name_generator(x): x for x in range(from_value, to_value + 1, step)} values = {name_generator(x): x for x in range(from_value, to_value + 1, step)}
return NamedInts(**values) return NamedInts(**values)