Create a building banner for the given example.
(example: str)
| 66 | |
| 67 | |
| 68 | def create_building_banner(example: str) -> str: |
| 69 | """Create a building banner for the given example.""" |
| 70 | banner_text = f"BUILDING {example}" |
| 71 | border_char = "=" |
| 72 | padding = 2 |
| 73 | text_width = len(banner_text) |
| 74 | total_width = text_width + (padding * 2) |
| 75 | |
| 76 | top_border = border_char * (total_width + 4) |
| 77 | middle_line = ( |
| 78 | f"{border_char} {' ' * padding}{banner_text}{' ' * padding} {border_char}" |
| 79 | ) |
| 80 | bottom_border = border_char * (total_width + 4) |
| 81 | |
| 82 | banner = f"{top_border}\n{middle_line}\n{bottom_border}" |
| 83 | |
| 84 | # Apply blue color using ANSI escape codes |
| 85 | blue_color = "\033[34m" |
| 86 | reset_color = "\033[0m" |
| 87 | return f"{blue_color}{banner}{reset_color}" |
| 88 | |
| 89 | |
| 90 | def get_example_error_message(project_root: Path, example: str) -> str: |
no outgoing calls
no test coverage detected