Skip to content

Commit

Permalink
updates error message
Browse files Browse the repository at this point in the history
  • Loading branch information
edublancas committed Feb 15, 2021
1 parent a1a74d2 commit c623e68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ploomber/util/util.py
Expand Up @@ -180,7 +180,7 @@ def signature_check(fn, params, task_name):

if 'upstream' in missing:
errors.append('Verify this task declared upstream depedencies or '
'remove the argument')
'remove the "upstream" argument from the function')

missing_except_upstream = sorted(missing - {'upstream'})

Expand Down
5 changes: 3 additions & 2 deletions tests/test_util_signature_check.py
Expand Up @@ -61,7 +61,7 @@ def fn(upstream):
error = ('Error rendering task "task" initialized with function '
'"fn". Missing arguments: [\'upstream\']. '
'Verify this task declared upstream depedencies or remove the '
'argument')
'"upstream" argument from the function')
assert error == str(excinfo.value)


Expand All @@ -74,7 +74,8 @@ def fn(upstream, a):

error = ('Error rendering task "task" initialized with function "fn". '
'Missing arguments: [\'a\', \'upstream\']. Verify this '
'task declared upstream depedencies or remove the argument. '
'task declared upstream depedencies or remove the "upstream" '
'argument from the function. '
'Pass [\'a\'] in "params"')
assert error == str(excinfo.value)

Expand Down

0 comments on commit c623e68

Please sign in to comment.