Skip to content

Commit

Permalink
Change default value of default parameter of ``QuotaClient.update…
Browse files Browse the repository at this point in the history
…_quota()`` to None
  • Loading branch information
nsoranzo committed Jul 25, 2024
1 parent 3086d3b commit 904ad43
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions bioblend/galaxy/quotas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from bioblend.galaxy import GalaxyInstance

QuotaOperations = Literal["+", "-", "="]
DefaultQuotaValues = Literal["no", "registered", "unregistered"]


class QuotaClient(Client):
Expand Down Expand Up @@ -80,7 +81,7 @@ def create_quota(
description: str,
amount: str,
operation: QuotaOperations,
default: Optional[Literal["no", "registered", "unregistered"]] = "no",
default: Optional[DefaultQuotaValues] = "no",
in_users: Optional[List[str]] = None,
in_groups: Optional[List[str]] = None,
) -> Dict[str, Any]:
Expand All @@ -101,8 +102,8 @@ def create_quota(
:type default: str
:param default: Whether or not this is a default quota. Valid values
are ``no``, ``unregistered``, ``registered``. None is
equivalent to ``no``.
are "no", "unregistered", "registered" and None. None is
equivalent to "no".
:type in_users: list of str
:param in_users: A list of user IDs or user emails.
Expand Down Expand Up @@ -142,7 +143,7 @@ def update_quota(
description: Optional[str] = None,
amount: Optional[str] = None,
operation: Optional[QuotaOperations] = None,
default: str = "no",
default: Optional[DefaultQuotaValues] = None,
in_users: Optional[List[str]] = None,
in_groups: Optional[List[str]] = None,
) -> str:
Expand All @@ -169,10 +170,10 @@ def update_quota(
:type default: str
:param default: Whether or not this is a default quota. Valid values
are ``no``, ``unregistered``, ``registered``.
are "no", "unregistered", "registered" and None.
Calling this method with ``default="no"`` on a
non-default quota will throw an error. Not
passing this parameter is equivalent to passing ``no``.
non-default quota will throw an error. Passing None is
equivalent to not changing the current status.
:type in_users: list of str
:param in_users: A list of user IDs or user emails.
Expand Down

0 comments on commit 904ad43

Please sign in to comment.