Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨Add rich click #307

Merged
merged 5 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion pros/cli/click_classes.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
from collections import defaultdict
from typing import *

from rich_click import RichCommand
import click.decorators
from click import ClickException
from pros.conductor.project import Project as p
from pros.common.utils import get_version


class PROSFormatted(click.BaseCommand):
class PROSFormatted(RichCommand):
"""
Common format functions used in the PROS derived classes. Derived classes mix and match which functions are needed
"""
Expand Down
5 changes: 5 additions & 0 deletions pros/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import pros.common.sentry

import click
import ctypes
import sys

import pros.common.ui as ui
Expand All @@ -27,6 +28,10 @@
import pros.cli.interactive
import pros.cli.user_script

if sys.platform == 'win32':
kernel32 = ctypes.windll.kernel32
kernel32.SetConsoleMode(kernel32.GetStdHandle(-11), 7)

root_sources = [
'build',
'conductor',
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
click>=6,<7
click>=8
rich-click
ayushuk marked this conversation as resolved.
Show resolved Hide resolved
pyserial
cachetools
requests
Expand All @@ -13,4 +14,4 @@ scan-build==2.0.13
sentry-sdk
observable
pypng==0.0.20
pyinstaller
pyinstaller
ayushuk marked this conversation as resolved.
Show resolved Hide resolved
Loading