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

Metadata: Check on typing for client mode #6490 #6579

Merged
merged 1 commit into from Mar 19, 2024
Merged
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
9 changes: 6 additions & 3 deletions lib/rucio/client/metaconventionsclient.py
Expand Up @@ -21,8 +21,11 @@
from rucio.client.baseclient import BaseClient
from rucio.client.baseclient import choice
from rucio.common.utils import build_url
from rucio.db.sqla.constants import KeyType
from typing import Union, Optional
from typing import Union, Optional, TYPE_CHECKING
bari12 marked this conversation as resolved.
Show resolved Hide resolved


if TYPE_CHECKING:
from rucio.db.sqla.constants import KeyType


class MetaConventionClient(BaseClient):
Expand All @@ -31,7 +34,7 @@ class MetaConventionClient(BaseClient):

META_BASEURL = 'meta_conventions'

def add_key(self, key: str, key_type: Union[KeyType, str], value_type: Optional[str] = None, value_regexp: Optional[str] = None) -> Optional[bool]:
def add_key(self, key: str, key_type: Union['KeyType', str], value_type: Optional[str] = None, value_regexp: Optional[str] = None) -> Optional[bool]:
"""
Sends the request to add an allowed key for DID metadata (update the DID Metadata Conventions table with a new key).

Expand Down