Coverage for little_loops/logo.py: 0%

1"""Logo display utilities for little-loops CLI.

2

3 Provides functions to read and display the ASCII art logo.

4"""

5

6 from __future__ import annotations

7

8 from pathlib import Path

9

10

11 def get_logo() -> str | None:

12 """Read the CLI logo from assets.

13

14 Returns:

15 Logo text content, or None if file not found.

16 """

17 logo_path = Path(__file__).parent.parent.parent / "assets" / "ll-cli-logo.txt"

18 if logo_path.exists():

19 return logo_path.read_text()

20 return None

21

22

23 def print_logo() -> None:

24 """Print the CLI logo if available.

25

26 Silent no-op if logo file is not found.

27 """

28 if logo := get_logo():

29 print()

30 print(logo)

31 print()