-
Notifications
You must be signed in to change notification settings - Fork 2
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
[RPD-273] Improvements to the provision
user experience
#173
Changes from 3 commits
ebebbb6
55e8daa
45680d9
cdb7aa8
df18245
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,3 +43,4 @@ repos: | |
rev: v1.16.1 | ||
hooks: | ||
- id: typos | ||
args: [--config=.typos.toml] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# API Reference Documentation | ||
|
||
::: src.matcha_ml.core.core | ||
::: src.matcha_ml.core.core |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -155,5 +155,5 @@ module = [ | |
ignore_missing_imports = true | ||
|
||
[tool.ruff.pylint] | ||
max-branches = 13 | ||
max-branches = 14 | ||
max-args = 6 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,9 +30,14 @@ def __init__(self, status: str): | |
) | ||
self.progress.add_task(description=status, total=None) | ||
|
||
def __enter__(self) -> None: | ||
"""Call when a spinner object is created using a `with` statement.""" | ||
def __enter__(self): # type: ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: Just a thought - you could type this return with TypeVar or with a string. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good idea, I'll give it a try 👍🏻 |
||
"""Call when a spinner object is created using a `with` statement. | ||
|
||
Returns: | ||
Spinner: the instance for a context manager. | ||
""" | ||
self.progress.start() | ||
return self | ||
|
||
def __exit__( | ||
self, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,12 +27,14 @@ class AnalyticsEvent(str, Enum): | |
|
||
|
||
def execute_analytics_event( | ||
func: Callable, *args, **kwargs | ||
func: Callable, *args: dict, **kwargs: dict # type: ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure what's going on with the type hints here, but should *args really be a dict not a list? |
||
) -> Tuple[Optional[MatchaState], Any]: | ||
"""Exists to Temporarily fix misleading error messages coming from track decorator. | ||
|
||
Args: | ||
func (Callable): The function decorated by track. | ||
*args (dict): arguments passed to the function. | ||
**kwargs (dict): additional key word arguments passed to the function. | ||
|
||
Returns: | ||
The result of the call to func, the error code. | ||
|
@@ -114,7 +116,7 @@ def inner(*args: Any, **kwargs: Any) -> Any: | |
global_params.user_id, | ||
event_name.value, | ||
{ | ||
"time_taken": te - ts, | ||
"time_taken": float(te) - float(ts), # type: ignore | ||
"error_type": f"{error_code.__class__}.{error_code.__class__.__name__}", | ||
"command_succeeded": error_code is None, | ||
"matcha_state_uuid": matcha_state_uuid, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: brewing temperature of the what?