Skip to content

Commit f5d4981

Browse files
committed
fix: suppress T201 (print) warnings in setup_project.py
- Add ruff noqa: T201 comment to allow print statements in setup script - Setup scripts legitimately need print for user interaction output - Revert logging changes that were inappropriate for this use case
1 parent f5ae7cb commit f5d4981

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

setup_project.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python3
2+
# ruff: noqa: T201
23
"""Setup a new Python project from the template.
34
45
This script copies template files from .opencode/templates/ to the project root,
@@ -13,15 +14,12 @@
1314
python setup_project.py detect-fields
1415
"""
1516

16-
import logging
1717
import shutil
1818
from datetime import datetime
1919
from pathlib import Path
2020

2121
import fire
2222

23-
logger = logging.getLogger(__name__)
24-
2523
TEMPLATES_DIR = Path(__file__).parent / ".opencode" / "templates"
2624
ROOT_DIR = Path(__file__).parent
2725

@@ -50,7 +48,7 @@ def copy_and_rename_package(src_name: str, dst_name: str) -> None:
5048
if dst_dir.exists():
5149
shutil.rmtree(dst_dir)
5250
shutil.copytree(src_dir, dst_dir, dirs_exist_ok=True)
53-
logger.info("Copied package: %s -> %s", src_name, dst_name)
51+
print(f"Copied package: {src_name} -> {dst_name}")
5452

5553
for py_file in dst_dir.rglob("*.py"):
5654
content = py_file.read_text(encoding="utf-8")

0 commit comments

Comments
 (0)