Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
romilbhardwaj committed Jan 17, 2025
1 parent 5f12deb commit f638f1b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions sky/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ def get_all_clouds():
# Pretty print for UX.
if not quiet:
enabled_clouds_str = '\n :heavy_check_mark: '.join(
[''] + [_format_enabled_cloud(c) for c in sorted(all_enabled_clouds)])
[''] +
[_format_enabled_cloud(c) for c in sorted(all_enabled_clouds)])
rich.print('\n[green]:tada: Enabled clouds :tada:'
f'{enabled_clouds_str}[/green]')

Expand Down Expand Up @@ -230,18 +231,18 @@ def _format_enabled_cloud(cloud_name: str) -> str:
contexts = sky_clouds.Kubernetes.existing_allowed_contexts()
if not contexts:
return cloud_name

# Check if allowed_contexts is explicitly set in config
allowed_contexts = skypilot_config.get_nested(
('kubernetes', 'allowed_contexts'), None)

# Format the context info with consistent styling
if allowed_contexts is not None:
contexts_formatted = []
for i, context in enumerate(contexts):
# TODO: We should use ux_utils.INDENT_SYMBOL and
# INDENT_LAST_SYMBOL but, they are formatted for colorama, while
# here we are using rich. We should migrate this file to
# TODO: We should use ux_utils.INDENT_SYMBOL and
# INDENT_LAST_SYMBOL but, they are formatted for colorama, while
# here we are using rich. We should migrate this file to
# use colorama as we do in the rest of the codebase.
symbol = ('└── ' if i == len(contexts) - 1 else '├── ')
contexts_formatted.append(f'\n {symbol}{context}')
Expand Down

0 comments on commit f638f1b

Please sign in to comment.