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

Typing annotations: rule.py #6516

Merged
merged 4 commits into from Mar 7, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 16 additions & 1 deletion lib/rucio/common/types.py
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import Any, Callable, Optional, TypedDict, Union
from typing import Any, Callable, Literal, Optional, TypedDict, Union


class InternalType(object):
Expand Down Expand Up @@ -159,3 +159,18 @@ class RSESettingsDict(TypedDict):
deterministic: bool
domain: list[str]
protocols: list[RSEProtocolDict]


class RuleDict(TypedDict):
account: InternalAccount
copies: int
rse_expression: str
grouping: Literal['ALL', 'DATASET', 'NONE']
weight: str
lifetime: int
locked: bool
subscription_id: str
source_replica_expression: Optional[str]
activity: str
notify: Optional[Literal['Y', 'N', 'C']]
purge_replicas: bool