From 803c26ff3aed8b5e20195b8821505dc9039d8e01 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Tue, 22 Aug 2023 08:53:37 +0200 Subject: [PATCH] revert default and improved typing --- bioblend/galaxy/quotas/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bioblend/galaxy/quotas/__init__.py b/bioblend/galaxy/quotas/__init__.py index 14ef305d6..bf0029312 100644 --- a/bioblend/galaxy/quotas/__init__.py +++ b/bioblend/galaxy/quotas/__init__.py @@ -17,7 +17,7 @@ from bioblend.galaxy import GalaxyInstance QuotaOperations = Literal["+", "-", "="] - +QuotaDefault = Literal["no", "registered", "unregistered"] class QuotaClient(Client): module = "quotas" @@ -80,7 +80,7 @@ def create_quota( description: str, amount: str, operation: QuotaOperations, - default: Optional[Literal["no", "registered", "unregistered"]] = "no", + default: Optional[QuotaDefault] = "no", in_users: Optional[List[str]] = None, in_groups: Optional[List[str]] = None, ) -> Dict[str, Any]: @@ -142,7 +142,7 @@ def update_quota( description: Optional[str] = None, amount: Optional[str] = None, operation: Optional[QuotaOperations] = None, - default: Optional[str] = None, + default: Optional[QuotaDefault] = "no", in_users: Optional[List[str]] = None, in_groups: Optional[List[str]] = None, ) -> str: @@ -171,8 +171,8 @@ def update_quota( :param default: Whether or not this is a default quota. Valid values are ``no``, ``unregistered``, ``registered``. Calling this method with ``default="no"`` on a - non-default quota will throw an error. Not - passing this parameter will leave the default state as it is. + non-default quota will throw an error. None + will leave the default state as it is. :type in_users: list of str :param in_users: A list of user IDs or user emails.