We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a6fda96 commit 48bfc06Copy full SHA for 48bfc06
pyttman/core/entity_parsing/parsers.py
@@ -86,16 +86,11 @@ def _prepare_params(self):
86
f"Don't forget the trailing comma, "
87
f"example: '(1,)' instead of '(1)'.")
88
89
- if (
90
- self.valid_strings is not None
91
- ) and (
92
- isinstance(self.valid_strings, typing.Sequence) is False
93
- ):
+ if self.valid_strings is not None and not isinstance(self.valid_strings, typing.Sequence):
94
raise AttributeError("'valid_strings' must be a collection of "
95
f"strings, got: '{self.valid_strings}'")
96
else:
97
- self.valid_strings = tuple(
98
- [i.casefold() for i in self.valid_strings])
+ self.valid_strings = tuple([i.casefold() for i in self.valid_strings])
99
100
def reset(self) -> None:
101
"""
0 commit comments