Skip to content

Commit 337c7ef

Browse files
committed
2 parents c7dd384 + 5ab5942 commit 337c7ef

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/fastapi_cli/cli.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ def _get_module_tree(module_paths: List[Path]) -> Tree:
8888
for sub_path in module_paths[1:]:
8989
if sys.platform == "win32":
9090
sub_name = (
91-
f"Python {sub_path.name}" if sub_path.is_file() else f"Folder {sub_path.name}"
91+
f"Python {sub_path.name}"
92+
if sub_path.is_file()
93+
else f"Folder {sub_path.name}"
9294
)
9395
else:
9496
sub_name = (
@@ -124,7 +126,7 @@ def _run(
124126
if sys.platform == "win32":
125127
title = f"Starting {server_type} server"
126128
else:
127-
title = f"Starting {server_type} server 🚀"
129+
title = f"Starting {server_type} server 🚀"
128130

129131
toolkit.print_title(title, tag="FastAPI")
130132
toolkit.print_line()

src/fastapi_cli/logging.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ def setup_logging(
1010
terminal_width: Union[int, None] = None, level: int = logging.INFO
1111
) -> None:
1212
logger = logging.getLogger("fastapi_cli")
13-
if sys.platform == "win32":
14-
console = Console(width=terminal_width or 80, emoji=False, legacy_windows=True)
15-
else:
16-
console = Console(width=terminal_width or 80)
13+
console = Console(width=terminal_width or 80, emoji=False, legacy_windows=True, force_terminal=True)
1714
rich_handler = RichHandler(
1815
show_time=False,
1916
rich_tracebacks=True,

0 commit comments

Comments
 (0)