Skip to content

Commit 675c427

Browse files
committed
#42 - fix error message
Signed-off-by: Lance-Drane <Lance-Drane@users.noreply.github.com>
1 parent f5c19ee commit 675c427

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/intersect_sdk/_internal/schema.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ def get_schema_and_functions_from_capability_implementations(
619619
or not re.fullmatch(CAPABILITY_REGEX, cap_name)
620620
):
621621
die(
622-
f'Invalid intersect_sdk_capability_name on capability {capability_type.__name__} - must be a non-empty string with only alphanumeric characters and hyphens (you must explicitly set this, and do so on the class and not an instance).'
622+
f'Invalid intersect_sdk_capability_name on capability {capability_type.__name__} - must be a non-empty string with only alphanumeric characters and underscores (you must explicitly set this, and do so on the class and not an instance).'
623623
)
624624
if cap_name in capability_schemas:
625625
die(

tests/unit/test_schema_invalids.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ def valid_function(self, param: str) -> str: ...
853853
with pytest.raises(SystemExit):
854854
get_schema_helper([BadCapabilityName])
855855
assert 'Invalid intersect_sdk_capability_name on capability' in caplog.text
856-
assert 'only alphanumeric characters and hyphens' in caplog.text
856+
assert 'only alphanumeric characters and underscores' in caplog.text
857857

858858

859859
def test_duplicate_capability_names(caplog: pytest.LogCaptureFixture):

0 commit comments

Comments
 (0)