Skip to content

Commit

Permalink
Ruff linting
Browse files Browse the repository at this point in the history
  • Loading branch information
anshulg2743 committed Feb 8, 2025
1 parent 66a1010 commit 10e46ca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
8 changes: 7 additions & 1 deletion tabpfn_client/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Copyright (c) Prior Labs GmbH 2025.
# Licensed under the Apache License, Version 2.0

from tabpfn_client.config import init, reset, get_access_token, set_access_token, get_usage_details
from tabpfn_client.config import (
init,
reset,
get_access_token,
set_access_token,
get_usage_details,
)
from tabpfn_client.estimator import TabPFNClassifier, TabPFNRegressor
from tabpfn_client.service_wrapper import UserDataClient

Expand Down
2 changes: 1 addition & 1 deletion tabpfn_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -874,4 +874,4 @@ def get_prediction_hits_data(cls, access_token: str):

response = response.json()

return f"Currently, you have used {response['current_usage']} of the allowed limit of {'Unlimited' if int(response['custom_usage_allowed']) == -1 else response['custom_usage_allowed']} credits. The limit will reset at {response['reset_time']}."
return f"Currently, you have used {response['current_usage']} of the allowed limit of {'Unlimited' if int(response['custom_usage_allowed']) == -1 else response['custom_usage_allowed']} credits. The limit will reset at {response['reset_time']}."
3 changes: 2 additions & 1 deletion tabpfn_client/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def set_access_token(access_token: str):
UserAuthenticationClient.set_token(access_token)
Config.is_initialized = True


def get_usage_details() -> dict:
access_token = get_access_token()
return ServiceClient.get_prediction_hits_data(access_token)
return ServiceClient.get_prediction_hits_data(access_token)

0 comments on commit 10e46ca

Please sign in to comment.