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 authored and bari12 committed Mar 19, 2024
1 parent dc97725 commit b4fddc9
Showing 1 changed file with 6 additions and 3 deletions.
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


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

0 comments on commit b4fddc9

Please sign in to comment.