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 70d8394 commit 145cd81Copy full SHA for 145cd81
embeddings/strategies/base.py
@@ -36,11 +36,11 @@ def __init_subclass__(cls, **kwargs: dict) -> None: # noqa: D105
36
37
# require class level STRATEGY_NAME to be set
38
if not hasattr(cls, "STRATEGY_NAME"):
39
- msg = f"{cls.__name__} must define 'STRATEGY_NAME' class attribute"
40
- raise TypeError(msg)
+ raise TypeError(f"{cls.__name__} must define 'STRATEGY_NAME' class attribute")
41
if not isinstance(cls.STRATEGY_NAME, str):
42
- msg = f"{cls.__name__} must override 'STRATEGY_NAME' with a valid string"
43
+ raise TypeError(
+ f"{cls.__name__} must override 'STRATEGY_NAME' with a valid string"
+ )
44
45
@abstractmethod
46
def extract_text(self) -> str:
0 commit comments