def _task_validations(self, config: "PoeConfig", task_specs: "TaskSpecFactory"):
            """
            Perform validations on this TaskSpec that apply to a specific task type
            """
            try:
                # ruff: noqa: E501
                self.task_type._substitute_env_vars(self.content.strip(), {})  # type: ignore[attr-defined]
            except (ValueError, ExpressionParseError) as error:
                raise ConfigValidationError(f"Invalid expression: {error}")

            Perform validations on this TaskSpec that apply to a specific task type
            
poethepoet/task/expr.py