Skip to content

Commit 48bfc06

Browse files
committed
Refactoring, code cleanup
1 parent a6fda96 commit 48bfc06

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pyttman/core/entity_parsing/parsers.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,11 @@ def _prepare_params(self):
8686
f"Don't forget the trailing comma, "
8787
f"example: '(1,)' instead of '(1)'.")
8888

89-
if (
90-
self.valid_strings is not None
91-
) and (
92-
isinstance(self.valid_strings, typing.Sequence) is False
93-
):
89+
if self.valid_strings is not None and not isinstance(self.valid_strings, typing.Sequence):
9490
raise AttributeError("'valid_strings' must be a collection of "
9591
f"strings, got: '{self.valid_strings}'")
9692
else:
97-
self.valid_strings = tuple(
98-
[i.casefold() for i in self.valid_strings])
93+
self.valid_strings = tuple([i.casefold() for i in self.valid_strings])
9994

10095
def reset(self) -> None:
10196
"""

0 commit comments

Comments
 (0)