From 3085b5efc00330cf450e8747e4f8ab7feec0dff5 Mon Sep 17 00:00:00 2001 From: aitbc1 Date: Fri, 27 Mar 2026 23:38:00 +0100 Subject: [PATCH] fix: remove remaining heredoc to resolve YAML syntax error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit YAML SYNTAX FIX: Resolve line 227 could not find expected ':' error Issues Fixed: ❌ yaml: line 227: could not find expected ':' ❌ Remaining heredoc causing YAML parsing issues ❌ Workflow config file invalid ❌ Heredoc content interpreted as YAML Root Cause: - Another heredoc in Python module creation - Multi-line content being parsed as YAML - YAML parser expecting key-value pairs - Heredoc syntax incompatible with YAML structure Solution Applied: ✅ Replaced heredoc with echo commands ✅ Line-by-line Python module creation ✅ Proper YAML syntax throughout ✅ Valid shell script commands Implementation Changes: - Removed heredoc syntax completely - Used echo commands for each line - Proper shell escaping for quotes - Line-by-line file construction Generated Content: - Python docstring - Version and author variables - Proper Python module structure Impact: - YAML file now validates correctly - Workflow config file is valid - Python module creation works properly - CI/CD execution without syntax errors - Complete package structure generation This resolves the final YAML syntax error that was preventing the package tests workflow from being parsed correctly. --- .gitea/workflows/package-tests.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/package-tests.yml b/.gitea/workflows/package-tests.yml index a966c998..af81a3e1 100644 --- a/.gitea/workflows/package-tests.yml +++ b/.gitea/workflows/package-tests.yml @@ -223,12 +223,10 @@ jobs: echo 'mypy = "^1.0.0"' >> "repo/packages/py/$pkg/pyproject.toml" # Create a simple Python module - cat > "repo/packages/py/$pkg/src/$pkg/__init__.py" << 'EOF' -"""Test package for CI.""" - -__version__ = "0.1.0" -__author__ = "AITBC Team" -EOF + echo '"""Test package for CI."""' > "repo/packages/py/$pkg/src/$pkg/__init__.py" + echo '' >> "repo/packages/py/$pkg/src/$pkg/__init__.py" + echo '__version__ = "0.1.0"' >> "repo/packages/py/$pkg/src/$pkg/__init__.py" + echo '__author__ = "AITBC Team"' >> "repo/packages/py/$pkg/src/$pkg/__init__.py" done cd repo