Skip to content

Commit

Permalink
Metadata: Check on typing for client mode #6490
Browse files Browse the repository at this point in the history
  • Loading branch information
voetberg committed Mar 18, 2024
1 parent dc97725 commit dc59723
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/rucio/client/metaconventionsclient.py
Expand Up @@ -20,18 +20,20 @@

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 rucio.common.utils import build_url, is_client
from typing import Union, Optional

if not is_client:
from rucio.db.sqla.constants import KeyType


class MetaConventionClient(BaseClient):

"""Metadata client class for working with data identifier attributes"""

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

0 comments on commit dc59723

Please sign in to comment.