diff --git a/poethepoet/task/sequence.py b/poethepoet/task/sequence.py index dd3b0d879..e15fac57a 100644 --- a/poethepoet/task/sequence.py +++ b/poethepoet/task/sequence.py @@ -75,7 +75,10 @@ def __init__( subtask_name = ( sub_task_def - if isinstance(sub_task_def, str) + if ( + isinstance(sub_task_def, str) + and (sub_task_def[0].isalpha() or sub_task_def[0] == "_") + ) else SequenceTask._subtask_name(name, index) ) task_type_key = self.task_type.resolve_task_type( diff --git a/tests/fixtures/sequences_project/pyproject.toml b/tests/fixtures/sequences_project/pyproject.toml index f0c8b66c5..602b4870f 100644 --- a/tests/fixtures/sequences_project/pyproject.toml +++ b/tests/fixtures/sequences_project/pyproject.toml @@ -61,3 +61,7 @@ sequence = [ {script = "os:getcwd()", cwd = ".", print_result = true} ] cwd = "my_package" + +[tool.poe.tasks.setup] +default_item_type = "cmd" +sequence = ["./tools/poetry-ci-install.sh"]