Skip to content

Commit 0e1ea94

Browse files
authored
Update minds.py
1 parent 1102973 commit 0e1ea94

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

minds/minds.py

+4-12
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ def __init__(
2727
self.project = 'mindsdb'
2828

2929
if not utils.validate_mind_name(name):
30-
raise exc.MindNameInvalid("""
31-
Mind name should start with a letter and contain only letters, numbers or underscore, with a maximum of 32 characters.
32-
Spaces are not allowed.""")
30+
raise exc.MindNameInvalid("Mind name should start with a letter and contain only letters, numbers or underscore, with a maximum of 32 characters. Spaces are not allowed.")
3331

3432
self.name = name
3533
self.model_name = model_name
@@ -81,9 +79,7 @@ def update(
8179
data = {}
8280

8381
if not utils.validate_mind_name(name):
84-
raise exc.MindNameInvalid("""
85-
Mind name should start with a letter and contain only letters, numbers or underscore, with a maximum of 32 characters.
86-
Spaces are not allowed.""")
82+
raise exc.MindNameInvalid("Mind name should start with a letter and contain only letters, numbers or underscore, with a maximum of 32 characters. Spaces are not allowed.")
8783

8884
if datasources is not None:
8985
ds_names = []
@@ -227,9 +223,7 @@ def get(self, name: str) -> Mind:
227223
:return: a mind object
228224
"""
229225
if not utils.validate_mind_name(name):
230-
raise exc.MindNameInvalid("""
231-
Mind name should start with a letter and contain only letters, numbers or underscore, with a maximum of 32 characters.
232-
Spaces are not allowed.""")
226+
raise exc.MindNameInvalid("Mind name should start with a letter and contain only letters, numbers or underscore, with a maximum of 32 characters. Spaces are not allowed.")
233227

234228
item = self.api.get(f'/projects/{self.project}/minds/{name}').json()
235229
return Mind(self.client, **item)
@@ -277,9 +271,7 @@ def create(
277271
"""
278272

279273
if not utils.validate_mind_name(name):
280-
raise exc.MindNameInvalid("""
281-
Mind name should start with a letter and contain only letters, numbers or underscore, with a maximum of 32 characters.
282-
Spaces are not allowed.""")
274+
raise exc.MindNameInvalid("Mind name should start with a letter and contain only letters, numbers or underscore, with a maximum of 32 characters. Spaces are not allowed.")
283275

284276
if replace:
285277
try:

0 commit comments

Comments
 (0)