fix: Python 3.6 compatibility for tests
- Replace walrus operator (:=) with traditional assignment in config.py - Replace datetime.fromisoformat() with strptime() for Python 3.6 - Replace subprocess capture_output and text params with PIPE and universal_newlines - All tests now pass on Python 3.6.9 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -46,16 +46,20 @@ class TddaiConfig:
|
||||
config = cls()
|
||||
|
||||
# Override with environment variables if present
|
||||
if gitea_url := os.getenv("TDDAI_GITEA_URL"):
|
||||
gitea_url = os.getenv("TDDAI_GITEA_URL")
|
||||
if gitea_url:
|
||||
config.gitea_url = gitea_url
|
||||
|
||||
if repo_owner := os.getenv("TDDAI_REPO_OWNER"):
|
||||
repo_owner = os.getenv("TDDAI_REPO_OWNER")
|
||||
if repo_owner:
|
||||
config.repo_owner = repo_owner
|
||||
|
||||
if repo_name := os.getenv("TDDAI_REPO_NAME"):
|
||||
repo_name = os.getenv("TDDAI_REPO_NAME")
|
||||
if repo_name:
|
||||
config.repo_name = repo_name
|
||||
|
||||
if workspace_dir := os.getenv("TDDAI_WORKSPACE_DIR"):
|
||||
workspace_dir = os.getenv("TDDAI_WORKSPACE_DIR")
|
||||
if workspace_dir:
|
||||
config.workspace_dir = Path(workspace_dir)
|
||||
|
||||
return config
|
||||
|
||||
Reference in New Issue
Block a user