diff --git a/sc2.py b/sc2.py index da290af..7136e56 100644 --- a/sc2.py +++ b/sc2.py @@ -11,11 +11,12 @@ from pathlib import Path # ---------- optional deps ---------- # +PYPERCLIP_WARNING: str | None = None try: import pyperclip # type: ignore except ImportError: pyperclip = None - print( + PYPERCLIP_WARNING = ( "Note: Clipboard functionality ('pyperclip') is not available. Install it with 'uv add pyperclip'." ) @@ -208,6 +209,9 @@ def main() -> None: ) ns = ap.parse_args() + if PYPERCLIP_WARNING and not ns.write: + print(PYPERCLIP_WARNING) + if not ns.tests: EXCLUDED_DIRS.add("tests")